diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-17 23:10:06 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-17 23:10:06 (GMT) |
commit | 489cface92f40f4e82866b5fabf57d29e9632811 (patch) | |
tree | ccb319491f5d2864e84a460ef19cbbb0fa4dc1d7 | |
parent | 6aa50af000f85cc4497749fcf0860c8ed244a60e (diff) | |
parent | 08ddad034bfc7dbb81e6553b03f9df843d465ee4 (diff) | |
download | Qt-489cface92f40f4e82866b5fabf57d29e9632811.zip Qt-489cface92f40f4e82866b5fabf57d29e9632811.tar.gz Qt-489cface92f40f4e82866b5fabf57d29e9632811.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration:
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( aa3f786bdba4dc153620ae7f98e4b0e41770d1d1 )
Audio (osx); In pull mode emit readyRead() for each period received.
AudioInput example; disconnect from the built-in device when changing mode.
-rw-r--r-- | examples/multimedia/audioinput/audioinput.cpp | 5 | ||||
-rw-r--r-- | src/multimedia/audio/qaudioinput_mac_p.cpp | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp index 4a408a0..4e5f2a3 100644 --- a/examples/multimedia/audioinput/audioinput.cpp +++ b/examples/multimedia/audioinput/audioinput.cpp @@ -315,6 +315,11 @@ void InputTest::readMore() void InputTest::toggleMode() { // Change bewteen pull and push modes + if (m_input != 0) { + disconnect(m_input, 0, this, 0); + m_input = 0; + } + m_audioInput->stop(); if (m_pullMode) { diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp index cb65f6e..b99fe11 100644 --- a/src/multimedia/audio/qaudioinput_mac_p.cpp +++ b/src/multimedia/audio/qaudioinput_mac_p.cpp @@ -259,7 +259,7 @@ public: UInt32 inBusNumber, UInt32 inNumberFrames) { - const bool wasEmpty = m_buffer->used() == 0; + const bool pullMode = m_device == 0; OSStatus err; qint64 framesRendered = 0; @@ -330,7 +330,7 @@ public: framesRendered = copied / m_outputFormat.mBytesPerFrame; } - if (wasEmpty && framesRendered > 0) + if (pullMode && framesRendered > 0) emit readyRead(); return framesRendered; |