mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-15 06:26:26 +02:00
Merge pull request #6226 from kencooke/master
Workaround for audio having channels swapped under Qt 5.5.1
This commit is contained in:
commit
3c11cf2926
1 changed files with 4 additions and 2 deletions
|
@ -313,7 +313,9 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
|
||||||
bool adjustedFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
bool adjustedFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
||||||
const QAudioFormat& desiredAudioFormat,
|
const QAudioFormat& desiredAudioFormat,
|
||||||
QAudioFormat& adjustedAudioFormat) {
|
QAudioFormat& adjustedAudioFormat) {
|
||||||
if (!audioDevice.isFormatSupported(desiredAudioFormat)) {
|
// FIXME: directly using 24khz has a bug somewhere that causes channels to be swapped.
|
||||||
|
// Continue using our internal resampler, for now.
|
||||||
|
if (true || !audioDevice.isFormatSupported(desiredAudioFormat)) {
|
||||||
qCDebug(audioclient) << "The desired format for audio I/O is" << desiredAudioFormat;
|
qCDebug(audioclient) << "The desired format for audio I/O is" << desiredAudioFormat;
|
||||||
qCDebug(audioclient, "The desired audio format is not supported by this device");
|
qCDebug(audioclient, "The desired audio format is not supported by this device");
|
||||||
|
|
||||||
|
@ -321,7 +323,7 @@ bool adjustedFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
||||||
adjustedAudioFormat = desiredAudioFormat;
|
adjustedAudioFormat = desiredAudioFormat;
|
||||||
adjustedAudioFormat.setChannelCount(2);
|
adjustedAudioFormat.setChannelCount(2);
|
||||||
|
|
||||||
if (audioDevice.isFormatSupported(adjustedAudioFormat)) {
|
if (false && audioDevice.isFormatSupported(adjustedAudioFormat)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
adjustedAudioFormat.setChannelCount(1);
|
adjustedAudioFormat.setChannelCount(1);
|
||||||
|
|
Loading…
Reference in a new issue