From 852f684973807531d16133815f4ed535ea3011dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Mon, 28 Oct 2013 16:36:49 +0100 Subject: QSoundEffect: Set playing to true before starting the audio-device. When the audio-device starts playing it should be able to read from the source immediately. The OpenSL plugin would fail because the source was blocking the audio-device from reading, as the state still was in its initial state (stopped). Change-Id: Ia26fa2eb442e239f5209947e6c9cd464b7d976a4 Reviewed-by: Yoann Lopes --- src/multimedia/audio/qsoundeffect_qaudio_p.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/multimedia/audio/qsoundeffect_qaudio_p.cpp') diff --git a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp index 524c856a2..2de1b0067 100644 --- a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp +++ b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp @@ -236,10 +236,9 @@ void QSoundEffectPrivate::play() setStatus(QSoundEffect::Null); return; } + setPlaying(true); if (d->m_audioOutput && d->m_audioOutput->state() == QAudio::StoppedState && d->m_sampleReady) d->m_audioOutput->start(d); - - setPlaying(true); } void QSoundEffectPrivate::stop() -- cgit v1.2.3