summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-09-08 12:41:54 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-09-17 13:21:00 (GMT)
commitf43ec0dc8414d7342f02269fdc5cd6ac7b7ec44f (patch)
tree49376a6ef3aae2fdddba9583c18e8306f5db1bb9
parent82244a4b24776202802f35797e0bb72ec32dd0e7 (diff)
downloadQt-f43ec0dc8414d7342f02269fdc5cd6ac7b7ec44f.zip
Qt-f43ec0dc8414d7342f02269fdc5cd6ac7b7ec44f.tar.gz
Qt-f43ec0dc8414d7342f02269fdc5cd6ac7b7ec44f.tar.bz2
Discard all DevSound buffers held when QAudioInput::suspend() called
Resuming recording causes buffers previously provided to the client (via MDevSoundObserver::BufferToBeEmptied()) to be invalidated. The buffers therefore must be discarded when recording is suspended. Task-number: QTBUG-13058 Reviewed-by: Derick Hawcroft
-rw-r--r--src/multimedia/audio/qaudioinput_symbian_p.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/multimedia/audio/qaudioinput_symbian_p.cpp b/src/multimedia/audio/qaudioinput_symbian_p.cpp
index 9ae4368..b837055 100644
--- a/src/multimedia/audio/qaudioinput_symbian_p.cpp
+++ b/src/multimedia/audio/qaudioinput_symbian_p.cpp
@@ -178,10 +178,9 @@ void QAudioInputPrivate::suspend()
const qint64 samplesRecorded = getSamplesRecorded();
m_totalSamplesRecorded += samplesRecorded;
- if (m_devSoundBuffer) {
- m_devSoundBufferQ.append(m_devSoundBuffer);
- m_devSoundBuffer = 0;
- }
+ m_devSoundBuffer = 0;
+ m_devSoundBufferQ.clear();
+ m_devSoundBufferPos = 0;
setState(SymbianAudio::SuspendedState);
}