diff options
Diffstat (limited to 'src/multimedia/audio/qaudiooutput_mac_p.cpp')
-rw-r--r-- | src/multimedia/audio/qaudiooutput_mac_p.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp index cc52d90..86a2e31 100644 --- a/src/multimedia/audio/qaudiooutput_mac_p.cpp +++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp @@ -60,11 +60,11 @@ #include <QtCore/qtimer.h> #include <QtCore/qdebug.h> -#include <QtMultimedia/qaudiodeviceinfo.h> #include <QtMultimedia/qaudiooutput.h> #include "qaudio_mac_p.h" #include "qaudiooutput_mac_p.h" +#include "qaudiodeviceinfo_mac_p.h" QT_BEGIN_NAMESPACE @@ -278,6 +278,7 @@ QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray& device, const QAudioF if (QAudio::Mode(mode) == QAudio::AudioInput) errorCode = QAudio::OpenError; else { + audioDeviceInfo = new QAudioDeviceInfoInternal(device, QAudio::AudioOutput); isOpen = false; audioDeviceId = AudioDeviceID(did); audioUnit = 0; @@ -299,6 +300,7 @@ QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray& device, const QAudioF QAudioOutputPrivate::~QAudioOutputPrivate() { + delete audioDeviceInfo; close(); } @@ -424,7 +426,7 @@ QIODevice* QAudioOutputPrivate::start(QIODevice* device) { QIODevice* op = device; - if (!audioFormat.isValid() || !open()) { + if (!audioDeviceInfo->isFormatSupported(audioFormat) || !open()) { stateCode = QAudio::StoppedState; errorCode = QAudio::OpenError; return audioIO; |