OpenSL ES: Release audio device source in push mode

The IO device was leaking in push mode, as a new one was created each
time start was called.

Change-Id: I78bb45e9e4e801772e88104b11d7baedc9e91ba8
Reviewed-by: Michael Dippold <michael.dippold@us.thalesgroup.com>
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
This commit is contained in:
Christian Strømme
2016-08-22 20:10:22 +02:00
committed by Christian Stromme
parent 91d28b48cd
commit aa16b81872

View File

@@ -614,6 +614,12 @@ void QOpenSLESAudioOutput::stopPlayer()
{
setState(QAudio::StoppedState);
if (m_audioSource && !m_pullMode) {
m_audioSource->close();
delete m_audioSource;
m_audioSource = Q_NULLPTR;
}
// We need to change the state manually...
if (m_playItf)
(*m_playItf)->SetPlayState(m_playItf, SL_PLAYSTATE_STOPPED);