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>
This commit is contained in:
committed by
The Qt Project
parent
30cf028fb1
commit
852f684973
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user