mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:36:47 +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)
|
#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
|
// 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
|
// Changing the sample rate forces a resampling that (in samsung) amplifies +18 dB
|
||||||
// QAndroidJniObject brand = QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "BRAND");
|
QAndroidJniObject brand = QAndroidJniObject::getStaticObjectField<jstring>("android/os/Build", "BRAND");
|
||||||
// if (audioDevice == QAudioDeviceInfo::defaultInputDevice() && brand.toString().contains("samsung", Qt::CaseInsensitive)) {
|
if (audioDevice == QAudioDeviceInfo::defaultInputDevice() && brand.toString().contains("samsung", Qt::CaseInsensitive)) {
|
||||||
// audioFormat.setSampleRate(24000);
|
audioFormat.setSampleRate(24000);
|
||||||
// }
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!audioDevice.isFormatSupported(audioFormat)) {
|
if (!audioDevice.isFormatSupported(audioFormat)) {
|
||||||
|
@ -1849,7 +1849,7 @@ const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 2.0f;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_ANDROID
|
#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)
|
#elif defined(Q_OS_LINUX)
|
||||||
const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 2.0f;
|
const float AudioClient::CALLBACK_ACCELERATOR_RATIO = 2.0f;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue