summaryrefslogtreecommitdiffstats
path: root/src/plugins/windowsaudio/qwindowsaudioinput.h
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-13 16:25:15 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-04-14 14:42:21 +0000
commit07606dde9a1f6b89f582ff8f1fbc53e2d4eb2c22 (patch)
treefe9d60b38e6f4232619ba44dd8f15dd1eada444a /src/plugins/windowsaudio/qwindowsaudioinput.h
parentb529cf242a596b47ebb0fc659e63439fa6e7cb79 (diff)
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 <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/windowsaudio/qwindowsaudioinput.h')
-rw-r--r--src/plugins/windowsaudio/qwindowsaudioinput.h5
1 files changed, 2 insertions, 3 deletions
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 <QtCore/qt_windows.h>
-#include <mmsystem.h>
+#include "qwindowsaudioutils.h"
#include <QtCore/qfile.h>
#include <QtCore/qdebug.h>
@@ -121,7 +120,7 @@ private:
qint64 totalTimeValue;
bool pullMode;
bool resuming;
- WAVEFORMATEX wfx;
+ WAVEFORMATEXTENSIBLE wfx;
HWAVEIN hWaveIn;
MMRESULT result;
WAVEHDR* waveBlocks;