summaryrefslogtreecommitdiffstats
path: root/src/plugins/wasapi/qwasapiutils.h
diff options
context:
space:
mode:
authorChristian Stromme <christian.stromme@theqtcompany.com>2016-04-19 14:53:24 +0200
committerChristian Stromme <christian.stromme@qt.io>2016-05-20 10:54:32 +0000
commit3c5bbb0dac7bed3199ddddc88c0175d5a2ac1036 (patch)
tree51b9987225bf224637b87c3dd20558a3cca95811 /src/plugins/wasapi/qwasapiutils.h
parent49461f9cffa5439e536a844ec3a0134c252141e6 (diff)
Improve QAudioDeviceInfo::defaultDevice().
The previous implementation of QAudioDeviceInfo::defaultXDevice() would always report the first available device as the "default" one, making the order, in which devices were listed, a hidden requirement when implementing audio plugins. To make it easier and more reliable to retrieve the default device, all new plugins should implement the new QAudioSystemPluginExtension interface as well as the QAudioSystemPlugin. Devices will be chosen in the following order (first match wins): default plugin -> default device -> first available device plugins -> default device -> first available device Task-number: QTBUG-51292 Change-Id: I8ace78858976fe7c60a2c4a117ef15c4e1bb177f Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/plugins/wasapi/qwasapiutils.h')
-rw-r--r--src/plugins/wasapi/qwasapiutils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/wasapi/qwasapiutils.h b/src/plugins/wasapi/qwasapiutils.h
index 21eff3583..3dda0e1a5 100644
--- a/src/plugins/wasapi/qwasapiutils.h
+++ b/src/plugins/wasapi/qwasapiutils.h
@@ -134,6 +134,7 @@ namespace QWasapiUtils
bool convertToNativeFormat(const QAudioFormat &qt, WAVEFORMATEX *native);
bool convertFromNativeFormat(const WAVEFORMATEX *native, QAudioFormat *qt);
+ QByteArray defaultDevice(QAudio::Mode mode);
QList<QByteArray> availableDevices(QAudio::Mode mode);
Microsoft::WRL::ComPtr<AudioInterface> createOrGetInterface(const QByteArray &dev, QAudio::Mode mode);
}