fix: add quit condition in AudioOutput

This commit is contained in:
Xiao YiFang 2023-02-07 23:09:55 +08:00
parent 0f83a55c25
commit aa726f3d12

View file

@ -121,7 +121,10 @@ class AudioOutputPrivate: public QIODevice
{
case QAudio::StoppedState:
if( audioOutput->error() != QAudio::NoError )
{
qWarning() << "QAudioOutput stopped:" << audioOutput->error();
quit = true;
}
break;
default:
break;
@ -129,6 +132,8 @@ class AudioOutputPrivate: public QIODevice
} );
audioOutput->start( this );
if( audioOutput && audioOutput->state() == QAudio::StoppedState )
quit = true;
}
// audioOutput->setVolume(volume);