mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 22:34:54 +00:00
This can reduce audio latency according to https://developer.android.com/ndk/guides/audio/opensl/opensl-prog-notes#perform. Previously we were using the hardcoded values of 48000 Hz and 256 frames per buffer. The sample rate we use with this change is 48000 Hz on all devices I'm aware of, but the buffer size does vary across devices. Terminology note: The old code used the term "sample" to refer to what Android refers to as a "frame". "Frame" is a clearer term to use for this, so I've changed OpenSLESStream's terminology. One frame consists of one sample per channel.
124 lines
3.1 KiB
C++
124 lines
3.1 KiB
C++
// Copyright 2018 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <jni.h>
|
|
|
|
namespace IDCache
|
|
{
|
|
JNIEnv* GetEnvForThread();
|
|
|
|
jclass GetStringClass();
|
|
|
|
jclass GetNativeLibraryClass();
|
|
jmethodID GetDisplayToastMsg();
|
|
jmethodID GetDisplayAlertMsg();
|
|
jmethodID GetUpdateTouchPointer();
|
|
jmethodID GetOnTitleChanged();
|
|
jmethodID GetFinishEmulationActivity();
|
|
|
|
jclass GetAnalyticsClass();
|
|
jmethodID GetSendAnalyticsReport();
|
|
jmethodID GetAnalyticsValue();
|
|
|
|
jclass GetGameFileClass();
|
|
jfieldID GetGameFilePointer();
|
|
jmethodID GetGameFileConstructor();
|
|
|
|
jclass GetGameFileCacheClass();
|
|
jfieldID GetGameFileCachePointer();
|
|
|
|
jclass GetPairClass();
|
|
jmethodID GetPairConstructor();
|
|
|
|
jclass GetHashMapClass();
|
|
jmethodID GetHashMapInit();
|
|
jmethodID GetHashMapPut();
|
|
|
|
jclass GetCompressCallbackClass();
|
|
jmethodID GetCompressCallbackRun();
|
|
|
|
jclass GetContentHandlerClass();
|
|
jmethodID GetContentHandlerOpenFd();
|
|
jmethodID GetContentHandlerDelete();
|
|
jmethodID GetContentHandlerGetSizeAndIsDirectory();
|
|
jmethodID GetContentHandlerGetDisplayName();
|
|
jmethodID GetContentHandlerGetChildNames();
|
|
jmethodID GetContentHandlerDoFileSearch();
|
|
|
|
jclass GetNetworkHelperClass();
|
|
jmethodID GetNetworkHelperGetNetworkIpAddress();
|
|
jmethodID GetNetworkHelperGetNetworkPrefixLength();
|
|
jmethodID GetNetworkHelperGetNetworkGateway();
|
|
|
|
jmethodID GetBooleanSupplierGet();
|
|
|
|
jclass GetARCheatClass();
|
|
jfieldID GetARCheatPointer();
|
|
jmethodID GetARCheatConstructor();
|
|
|
|
jclass GetGeckoCheatClass();
|
|
jfieldID GetGeckoCheatPointer();
|
|
jmethodID GetGeckoCheatConstructor();
|
|
|
|
jclass GetPatchCheatClass();
|
|
jfieldID GetPatchCheatPointer();
|
|
jmethodID GetPatchCheatConstructor();
|
|
|
|
jclass GetGraphicsModGroupClass();
|
|
jfieldID GetGraphicsModGroupPointer();
|
|
jmethodID GetGraphicsModGroupConstructor();
|
|
|
|
jclass GetGraphicsModClass();
|
|
jfieldID GetGraphicsModPointer();
|
|
jmethodID GetGraphicsModConstructor();
|
|
|
|
jclass GetRiivolutionPatchesClass();
|
|
jfieldID GetRiivolutionPatchesPointer();
|
|
|
|
jclass GetWiiUpdateCallbackClass();
|
|
jmethodID GetWiiUpdateCallbackFunction();
|
|
|
|
jclass GetControlClass();
|
|
jfieldID GetControlPointer();
|
|
jmethodID GetControlConstructor();
|
|
|
|
jclass GetControlGroupClass();
|
|
jfieldID GetControlGroupPointer();
|
|
jmethodID GetControlGroupConstructor();
|
|
|
|
jclass GetControlReferenceClass();
|
|
jfieldID GetControlReferencePointer();
|
|
jmethodID GetControlReferenceConstructor();
|
|
|
|
jclass GetControlGroupContainerClass();
|
|
jfieldID GetControlGroupContainerPointer();
|
|
jmethodID GetControlGroupContainerConstructor();
|
|
|
|
jclass GetEmulatedControllerClass();
|
|
jfieldID GetEmulatedControllerPointer();
|
|
jmethodID GetEmulatedControllerConstructor();
|
|
|
|
jclass GetNumericSettingClass();
|
|
jfieldID GetNumericSettingPointer();
|
|
jmethodID GetNumericSettingConstructor();
|
|
|
|
jclass GetCoreDeviceClass();
|
|
jfieldID GetCoreDevicePointer();
|
|
jmethodID GetCoreDeviceConstructor();
|
|
|
|
jclass GetCoreDeviceControlClass();
|
|
jfieldID GetCoreDeviceControlPointer();
|
|
jmethodID GetCoreDeviceControlConstructor();
|
|
|
|
jclass GetInputDetectorClass();
|
|
jfieldID GetInputDetectorPointer();
|
|
|
|
jmethodID GetRunnableRun();
|
|
|
|
jclass GetAudioUtilsClass();
|
|
jmethodID GetAudioUtilsGetSampleRate();
|
|
jmethodID GetAudioUtilsGetFramesPerBuffer();
|
|
|
|
} // namespace IDCache
|