diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-09-08 12:41:54 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-09-17 12:32:13 (GMT) |
commit | 496f49b4398f8ff70e50236a71b1b221183171ca (patch) | |
tree | cc5338fdb438272a91e7ccc8edbe3babfba499dc /src/multimedia | |
parent | bcf965462f07e7772754777aeb64dab9591ba0b0 (diff) | |
download | Qt-496f49b4398f8ff70e50236a71b1b221183171ca.zip Qt-496f49b4398f8ff70e50236a71b1b221183171ca.tar.gz Qt-496f49b4398f8ff70e50236a71b1b221183171ca.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
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/audio/qaudioinput_symbian_p.cpp | 7 |
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); } |