From 496f49b4398f8ff70e50236a71b1b221183171ca Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 8 Sep 2010 13:41:54 +0100 Subject: 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 --- src/multimedia/audio/qaudioinput_symbian_p.cpp | 7 +++---- 1 file 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); } -- cgit v0.12