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:
committed by
Christian Stromme
parent
91d28b48cd
commit
aa16b81872
@@ -614,6 +614,12 @@ void QOpenSLESAudioOutput::stopPlayer()
|
|||||||
{
|
{
|
||||||
setState(QAudio::StoppedState);
|
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...
|
// We need to change the state manually...
|
||||||
if (m_playItf)
|
if (m_playItf)
|
||||||
(*m_playItf)->SetPlayState(m_playItf, SL_PLAYSTATE_STOPPED);
|
(*m_playItf)->SetPlayState(m_playItf, SL_PLAYSTATE_STOPPED);
|
||||||
|
|||||||
Reference in New Issue
Block a user