diff options
Diffstat (limited to 'src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp')
-rw-r--r-- | src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp | 8 |
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 |