From 07606dde9a1f6b89f582ff8f1fbc53e2d4eb2c22 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Fri, 13 Mar 2015 16:25:15 +0100 Subject: WindowsAudio: improve supported formats detection. QAudioDeviceInfo::isFormatSupported() now tries to open the device with that format to theck if it is supported. We were before simply checking that its parameters were included in the list of supported values, which might be incomplete. In addition, since the Windows API to check device capabilities is quite limited, we now test additional common formats and add them to the supported formats if the device can open them. Task-number: QTBUG-42648 Change-Id: Idd0affbd6d91d4fd027a6a4c86c2f3fe008a118f Reviewed-by: Christian Stromme --- src/plugins/windowsaudio/qwindowsaudiodeviceinfo.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/plugins/windowsaudio/qwindowsaudiodeviceinfo.h') diff --git a/src/plugins/windowsaudio/qwindowsaudiodeviceinfo.h b/src/plugins/windowsaudio/qwindowsaudiodeviceinfo.h index 3b274fd8d..4a2de555f 100644 --- a/src/plugins/windowsaudio/qwindowsaudiodeviceinfo.h +++ b/src/plugins/windowsaudio/qwindowsaudiodeviceinfo.h @@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE - const unsigned int MAX_SAMPLE_RATES = 5; const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 }; @@ -91,15 +90,14 @@ private: QAudio::Mode mode; QString device; quint32 devId; - QAudioFormat nearest; QList sampleRatez; QList channelz; QList sizez; - QList byteOrderz; - QStringList codecz; QList typez; }; + + QT_END_NAMESPACE -- cgit v1.2.3