Make louder android mic

This commit is contained in:
Gabriel Calero 2018-07-11 19:14:24 -03:00
parent 07a7bbbcf6
commit c11f4be5c1

View file

@ -482,6 +482,12 @@ bool nativeFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
audioFormat.setSampleType(QAudioFormat::SignedInt); audioFormat.setSampleType(QAudioFormat::SignedInt);
audioFormat.setByteOrder(QAudioFormat::LittleEndian); audioFormat.setByteOrder(QAudioFormat::LittleEndian);
#if defined(Q_OS_ANDROID)
if (audioDevice == QAudioDeviceInfo::defaultInputDevice()) {
audioFormat.setSampleRate(44100);
}
#endif
if (!audioDevice.isFormatSupported(audioFormat)) { if (!audioDevice.isFormatSupported(audioFormat)) {
qCWarning(audioclient) << "The native format is" << audioFormat << "but isFormatSupported() failed."; qCWarning(audioclient) << "The native format is" << audioFormat << "but isFormatSupported() failed.";
return false; return false;