Added check to alsa backend for QAudioOutput
- Was asserting when stop() called when in IdleState Change-Id: Ib8a5bd149c0b9c700c709520cf8ffdd237e08694 Reviewed-by: Ling Hu <ling.hu@nokia.com> Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
a646db3ef6
commit
64dbf9d968
@@ -747,6 +747,11 @@ bool QAudioOutputPrivate::deviceReady()
|
|||||||
if(input > (int)buffer_frames)
|
if(input > (int)buffer_frames)
|
||||||
input = buffer_frames;
|
input = buffer_frames;
|
||||||
l = audioSource->read(audioBuffer,snd_pcm_frames_to_bytes(handle, input));
|
l = audioSource->read(audioBuffer,snd_pcm_frames_to_bytes(handle, input));
|
||||||
|
|
||||||
|
// reading can take a while and stream may have been stopped
|
||||||
|
if (!handle)
|
||||||
|
return false;
|
||||||
|
|
||||||
if(l > 0) {
|
if(l > 0) {
|
||||||
// Got some data to output
|
// Got some data to output
|
||||||
if(deviceState != QAudio::ActiveState)
|
if(deviceState != QAudio::ActiveState)
|
||||||
|
|||||||
Reference in New Issue
Block a user