mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
fix: add quit condition in AudioOutput
This commit is contained in:
parent
0f83a55c25
commit
aa726f3d12
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue