summaryrefslogtreecommitdiffstats
path: root/examples/multimedia
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-06-16 06:43:57 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-06-16 06:45:59 (GMT)
commitc7ae45fd1357712e1bad7dd30c3958a5866d6ac4 (patch)
tree6a971510d00aa153d4dec75f84297aa34ec7267b /examples/multimedia
parentaa97c7b7a71ddaf3f01f312658b9a43428846aee (diff)
downloadQt-c7ae45fd1357712e1bad7dd30c3958a5866d6ac4.zip
Qt-c7ae45fd1357712e1bad7dd30c3958a5866d6ac4.tar.gz
Qt-c7ae45fd1357712e1bad7dd30c3958a5866d6ac4.tar.bz2
AudioInput example; disconnect from the built-in device when changing mode.
Reviewed-by:Dmytro Poplavskiy
Diffstat (limited to 'examples/multimedia')
-rw-r--r--examples/multimedia/audioinput/audioinput.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp
index 7c2cc30..9dca50c 100644
--- a/examples/multimedia/audioinput/audioinput.cpp
+++ b/examples/multimedia/audioinput/audioinput.cpp
@@ -312,6 +312,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) {