diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2009-09-24 01:46:06 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2009-09-24 02:40:12 (GMT) |
commit | 609dd32580b1e07213a2b2efdd4d854c34e8f6d7 (patch) | |
tree | 5d59e79dbf5b3ec4d9af9005536f828de1af55fc | |
parent | b94e0ed8fafef214c0c549ebfb4b39338bece4a1 (diff) | |
download | Qt-609dd32580b1e07213a2b2efdd4d854c34e8f6d7.zip Qt-609dd32580b1e07213a2b2efdd4d854c34e8f6d7.tar.gz Qt-609dd32580b1e07213a2b2efdd4d854c34e8f6d7.tar.bz2 |
Mac audio; emit stateChanged on start, don't flush in push mode.
Reviewed-by: Bill King
-rw-r--r-- | src/multimedia/audio/qaudioinput_mac_p.cpp | 7 | ||||
-rw-r--r-- | src/multimedia/audio/qaudiooutput_mac_p.cpp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp index ba5801a..07fa3f4 100644 --- a/src/multimedia/audio/qaudioinput_mac_p.cpp +++ b/src/multimedia/audio/qaudioinput_mac_p.cpp @@ -376,6 +376,9 @@ public: void flush(bool all = false) { + if (m_device == 0) + return; + const int used = m_buffer->used(); const int readSize = all ? used : used - (used % m_maxPeriodSize); @@ -723,6 +726,10 @@ QIODevice* QAudioInputPrivate::start(QIODevice* device) audioThreadStart(); + stateCode = QAudio::ActiveState; + errorCode = QAudio::NoError; + emit stateChanged(stateCode); + return op; } diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp index bf9a096..4364704 100644 --- a/src/multimedia/audio/qaudiooutput_mac_p.cpp +++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp @@ -460,6 +460,8 @@ QIODevice* QAudioOutputPrivate::start(QIODevice* device) if (stateCode == QAudio::ActiveState) audioThreadStart(); + emit stateChanged(stateCode); + return op; } |