summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qsoundeffect_qaudio_p.cpp
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2013-10-28 16:36:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-30 15:02:28 +0100
commit852f684973807531d16133815f4ed535ea3011dc (patch)
tree273b58e0e8b6915f27d5712b62d46b98ec153dbc /src/multimedia/audio/qsoundeffect_qaudio_p.cpp
parent30cf028fb158f08bc01357476f73426c43c35b4e (diff)
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 <yoann.lopes@digia.com>
Diffstat (limited to 'src/multimedia/audio/qsoundeffect_qaudio_p.cpp')
-rw-r--r--src/multimedia/audio/qsoundeffect_qaudio_p.cpp3
1 files changed, 1 insertions, 2 deletions
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()