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/qwindowsaudioinput.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/windowsaudio/qwindowsaudioinput.h') diff --git a/src/plugins/windowsaudio/qwindowsaudioinput.h b/src/plugins/windowsaudio/qwindowsaudioinput.h index 27edabf0c..151996d78 100644 --- a/src/plugins/windowsaudio/qwindowsaudioinput.h +++ b/src/plugins/windowsaudio/qwindowsaudioinput.h @@ -45,8 +45,7 @@ #ifndef QWINDOWSAUDIOINPUT_H #define QWINDOWSAUDIOINPUT_H -#include -#include +#include "qwindowsaudioutils.h" #include #include @@ -121,7 +120,7 @@ private: qint64 totalTimeValue; bool pullMode; bool resuming; - WAVEFORMATEX wfx; + WAVEFORMATEXTENSIBLE wfx; HWAVEIN hWaveIn; MMRESULT result; WAVEHDR* waveBlocks; -- cgit v1.2.3