summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp')
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
index ecd03e5..d3dfa5f 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
@@ -78,7 +78,13 @@ QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray const& handle, QAu
bool QAudioDeviceInfoInternal::isFormatSupported(const QAudioFormat& format) const
{
- return format.codec() == QString::fromLatin1("audio/pcm");
+ QAudioDeviceInfoInternal *self = const_cast<QAudioDeviceInfoInternal*>(this);
+
+ return format.isValid()
+ && format.codec() == QString::fromLatin1("audio/pcm")
+ && self->frequencyList().contains(format.frequency())
+ && self->channelsList().contains(format.channels())
+ && self->sampleSizeList().contains(format.sampleSize());
}
QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const