revert change that trusted Qt's claim that it supports the format

This commit is contained in:
Brad Hefta-Gaub 2016-02-22 11:22:03 -08:00
parent f24e4bc6b1
commit bb1ed2147f

View file

@ -279,9 +279,10 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
bool adjustedFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
const QAudioFormat& desiredAudioFormat,
QAudioFormat& adjustedAudioFormat) {
// There had been a note here that 2khz was swapping channels. That doesn't seem to be happening
// any more for me. If it does, then we'll want to always resample.
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 audio format is not supported by this device");
@ -289,7 +290,7 @@ bool adjustedFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
adjustedAudioFormat = desiredAudioFormat;
adjustedAudioFormat.setChannelCount(2);
if (audioDevice.isFormatSupported(adjustedAudioFormat)) {
if (false && audioDevice.isFormatSupported(adjustedAudioFormat)) {
return true;
} else {
adjustedAudioFormat.setChannelCount(1);