summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-05-04 09:06:19 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-11-05 12:47:45 +0000
commitbe919fd68a844a2e7e0d15c70fc5ccacce8d4edc (patch)
tree575f75757f2517bae3d1e6c7f4890b2b049c6e2c /src/plugins/gstreamer
parent630738f9ef1ba7467c3c280a1cb64471c37d62d1 (diff)
Alsa: Do not open device twice in QSoundEffect
When either QSoundEffect::loadedChanged or QSoundEffect::statusChanged is emitted QSoundEffect::play() can be called which results to call QAudioOutput::start() twice. Added a fix to call QAudioOutput::start() only if QAudioOutput::state() is QAudio::StoppedState. Flow trace: 1. PrivateSoundSource::sampleReady() 2. QSoundEffectPrivate::setStatus(QSoundEffect::Ready) and emits statusChanged() or loadedChanged() 3. If there is a connection to QSoundEffect::loadedChanged/statusChanged and QSoundEffect::play() is called there. 4. QSoundEffect::play() calls QAudioOutput::start() because sample is ready 5. QAudioOutput::start() is called again within PrivateSoundSource::sampleReady() when QSoundEffectPrivate::setStatus exited. Change-Id: I7ad8e9126b6006e1972356c80a7fd2e5c6a5ea04 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/gstreamer')
0 files changed, 0 insertions, 0 deletions