OpenSL: don't try to enqueue new buffers when the buffer queue is full.
It could lead to corrupted sound since we were overwritting buffers that weren't played yet. Task-number: QTBUG-39015 Change-Id: I4c015c5383b813955998145d6316acc8c22f19a3 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
69598e22f3
commit
5a0e49369d
@@ -568,7 +568,7 @@ void QOpenSLESAudioOutput::destroyPlayer()
|
||||
|
||||
qint64 QOpenSLESAudioOutput::writeData(const char *data, qint64 len)
|
||||
{
|
||||
if (!len)
|
||||
if (!len || !m_availableBuffers.load())
|
||||
return 0;
|
||||
|
||||
if (len > m_bufferSize)
|
||||
|
||||
Reference in New Issue
Block a user