summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/multimedia/audio/qsoundeffect_qaudio_p.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp
index 77ed48b4a..adb334dd6 100644
--- a/src/multimedia/audio/qsoundeffect_qaudio_p.cpp
+++ b/src/multimedia/audio/qsoundeffect_qaudio_p.cpp
@@ -353,7 +353,8 @@ void PrivateSoundSource::stateChanged(QAudio::State state)
#ifdef QT_QAUDIO_DEBUG
qDebug() << this << "stateChanged " << state;
#endif
- if (state == QAudio::IdleState && m_runningCount == 0)
+ if ((state == QAudio::IdleState && m_runningCount == 0)
+ || (state == QAudio::StoppedState && m_audioOutput->error() != QAudio::NoError))
emit soundeffect->stop();
}