mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 03:33:38 +02:00
Add comment to explain the workaround
This commit is contained in:
parent
e039ef1729
commit
d8af12152b
1 changed files with 2 additions and 0 deletions
|
@ -487,6 +487,8 @@ bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
|||
audioFormat.setByteOrder(QAudioFormat::LittleEndian);
|
||||
|
||||
#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);
|
||||
|
|
Loading…
Reference in a new issue