From 98b335dadef433e383d3a25dbdadbb5efe7f8429 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 1 Sep 2010 13:49:54 +0100 Subject: Discard empty buffer on call to QAudioOutput::resume() The Symbian backend holds buffers which are passed to it from DevSound, exposing the memory of these buffers via the QIODevice interface. When QAudioOutput::resume() is called, the backend re-starts data flow by passing the buffer it holds back to DevSound. Previously, this would not happen if the buffer was empty, potentially causing playback to stall. This patch ensures that the buffer is always sent back to DevSound, and data flow therefore always resumes. Task-number: QTBUG-13059 Reviewed-by: Derick Hawcroft --- src/multimedia/audio/qaudiooutput_symbian_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multimedia/audio/qaudiooutput_symbian_p.cpp b/src/multimedia/audio/qaudiooutput_symbian_p.cpp index 5098469..5054ae3 100644 --- a/src/multimedia/audio/qaudiooutput_symbian_p.cpp +++ b/src/multimedia/audio/qaudiooutput_symbian_p.cpp @@ -210,7 +210,7 @@ void QAudioOutputPrivate::suspend() void QAudioOutputPrivate::resume() { if (SymbianAudio::SuspendedState == m_internalState) { - if (!m_pullMode && m_devSoundBuffer && m_devSoundBuffer->Data().Length()) + if (!m_pullMode && m_devSoundBuffer) bufferFilled(); startPlayback(); } -- cgit v0.12