summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Dippold <michael.dippold@us.thalesgroup.com>2016-08-18 09:10:21 -0700
committerMichael Dippold <michael.dippold@us.thalesgroup.com>2016-08-22 19:00:39 +0000
commit0ce67605de8e71f0607b36e2ef28801c3fc5c655 (patch)
tree294874ed48020d63962aa6a320e2c7ca91dc6842 /src
parent69296d229eb2f5b5842f7855ef4110e0e4817da2 (diff)
OpenSL ES: Fix buffer corruption
When start is called, the buffer is always filled starting from index 0 without regard to m_nexBuffer. m_nextBuffer could be set to 1 from the previous playback which causes the second buffer to be filled first, which is now the currently playing buffer. This is causing an audible hiccup right after starting in cases where m_nextBuffer starts at 1. Change-Id: Ia0d73638350d5258a51943d7a1c7cd6f22d068ee Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/opensles/qopenslesaudiooutput.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/opensles/qopenslesaudiooutput.cpp b/src/plugins/opensles/qopenslesaudiooutput.cpp
index 3e0ab68c7..94476f58a 100644
--- a/src/plugins/opensles/qopenslesaudiooutput.cpp
+++ b/src/plugins/opensles/qopenslesaudiooutput.cpp
@@ -115,6 +115,7 @@ void QOpenSLESAudioOutput::start(QIODevice *device)
m_pullMode = true;
m_audioSource = device;
+ m_nextBuffer = 0;
setState(QAudio::ActiveState);
setError(QAudio::NoError);