diff options
author | Christian Strømme <christian.stromme@qt.io> | 2016-08-22 20:10:22 +0200 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2016-08-25 12:24:04 +0000 |
commit | aa16b8187206c5763429105ec8e5014fb837b925 (patch) | |
tree | 474b4db44c57c5c09c3c9df54d1fa36215ba1e68 /src | |
parent | 91d28b48cd7c3ffda21b6d961df29b6aab1caed1 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/opensles/qopenslesaudiooutput.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/opensles/qopenslesaudiooutput.cpp b/src/plugins/opensles/qopenslesaudiooutput.cpp index 83691f127..06a990ec3 100644 --- a/src/plugins/opensles/qopenslesaudiooutput.cpp +++ b/src/plugins/opensles/qopenslesaudiooutput.cpp @@ -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); |