mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 10:53:34 +02:00
Test 2: input sample rate: 24khz. Set CALLBACK_ACCELERATOR_RATIO = 0.5 for android
This commit is contained in:
parent
f98c19fd1d
commit
b8bab858d9
1 changed files with 5 additions and 5 deletions
|
@ -489,10 +489,10 @@ bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
|||
#if defined(Q_OS_ANDROID)
|
||||
// Using the HW sample rate (AUDIO_INPUT_FLAG_FAST) in some samsung phones causes a low volume at input stream
|
||||
// Changing the sample rate forces a resampling that (in samsung) amplifies +18 dB
|
||||
// QAndroidJniObject brand = QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "BRAND");
|
||||
// if (audioDevice == QAudioDeviceInfo::defaultInputDevice() && brand.toString().contains("samsung", Qt::CaseInsensitive)) {
|
||||
// audioFormat.setSampleRate(24000);
|
||||
// }
|
||||
QAndroidJniObject brand = QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "BRAND");
|
||||
if (audioDevice == QAudioDeviceInfo::defaultInputDevice() && brand.toString().contains("samsung", Qt::CaseInsensitive)) {
|
||||
audioFormat.setSampleRate(24000);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!audioDevice.isFormatSupported(audioFormat)) {
|
||||
|
@ -1849,7 +1849,7 @@ const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 2.0f;
|
|||
#endif
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 1.0f;
|
||||
const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 0.5f;
|
||||
#elif defined(Q_OS_LINUX)
|
||||
const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 2.0f;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue