diff options
-rw-r--r-- | engines/sci/sound/music.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 32f1869e33..d1555ca7a6 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -365,6 +365,7 @@ void SciMusic::soundPlay(MusicEntry *pSnd) { } void SciMusic::soundStop(MusicEntry *pSnd) { + SoundStatus previousStatus = pSnd->status; pSnd->status = kSoundStopped; if (_soundVersion <= SCI_VERSION_0_LATE) pSnd->isQueued = false; @@ -374,7 +375,9 @@ void SciMusic::soundStop(MusicEntry *pSnd) { if (pSnd->pMidiParser) { _mutex.lock(); pSnd->pMidiParser->mainThreadBegin(); - pSnd->pMidiParser->stop(); + // We shouldn't call stop in case it's paused, otherwise we would send allNotesOff() again + if (previousStatus == kSoundPlaying) + pSnd->pMidiParser->stop(); freeChannels(pSnd); pSnd->pMidiParser->mainThreadEnd(); _mutex.unlock(); |