summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioinput_mac_p.cpp
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2009-09-24 01:46:06 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2009-09-24 02:40:12 (GMT)
commit609dd32580b1e07213a2b2efdd4d854c34e8f6d7 (patch)
tree5d59e79dbf5b3ec4d9af9005536f828de1af55fc /src/multimedia/audio/qaudioinput_mac_p.cpp
parentb94e0ed8fafef214c0c549ebfb4b39338bece4a1 (diff)
downloadQt-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
Diffstat (limited to 'src/multimedia/audio/qaudioinput_mac_p.cpp')
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp7
1 files changed, 7 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;
}