From 1f6d3c9cddaf1e44ae9f0a18e9df5d4affe3f8b2 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Tue, 6 Apr 2010 12:35:01 +1000 Subject: QAudioInput: possible change of state without emitting stateChange() Removed state change from close() function, should be set by caller depending on context. Task-number:QTBUG-9357 Reviewed-by:Dmytro Poplavskiy --- src/multimedia/audio/qaudioinput_alsa_p.cpp | 1 - src/multimedia/audio/qaudiooutput_alsa_p.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp index ead9995..6b15008 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.cpp +++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp @@ -428,7 +428,6 @@ bool QAudioInputPrivate::open() void QAudioInputPrivate::close() { - deviceState = QAudio::StoppedState; timer->stop(); if ( handle ) { diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp index 1cef335..cf3726b 100644 --- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp +++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp @@ -485,7 +485,6 @@ bool QAudioOutputPrivate::open() void QAudioOutputPrivate::close() { - deviceState = QAudio::StoppedState; timer->stop(); if ( handle ) { @@ -701,6 +700,7 @@ bool QAudioOutputPrivate::deviceReady() } else if(l < 0) { close(); + deviceState = QAudio::StoppedState; errorState = QAudio::IOError; emit stateChanged(deviceState); } -- cgit v0.12