summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-10-06 12:32:43 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-10-06 12:32:43 (GMT)
commite3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d (patch)
tree08fa39a9605ec38a45247baea0e2053179f5970f /src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
parent838ed9c68aef4d5a4f0b4d4dbbc1c1f7797cde91 (diff)
parent901ea45ca02dc8fbbf3f6112240c4e468c240b73 (diff)
downloadQt-e3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d.zip
Qt-e3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d.tar.gz
Qt-e3724aeab93a2ab3cc5b1d78c42f9a4e2f60628d.tar.bz2
Merge commit 'origin/master' into fileEngines
Conflicts: src/s60installs/bwins/QtCoreu.def
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 19f3b3c..727f6a6 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