aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-26 10:47:38 +0000
committerMartin Kiewitz2010-06-26 10:47:38 +0000
commit16f854ba644aff930236d4f3ed5c8e6be35a970b (patch)
tree50933e81f994fa20c77d2739517ddc0e908cb017 /engines
parentcf3a37585cfd333a10acfd5d2eae853c6c47ed6d (diff)
downloadscummvm-rg350-16f854ba644aff930236d4f3ed5c8e6be35a970b.tar.gz
scummvm-rg350-16f854ba644aff930236d4f3ed5c8e6be35a970b.tar.bz2
scummvm-rg350-16f854ba644aff930236d4f3ed5c8e6be35a970b.zip
SCI: dont call midiparser->stop() if paused sound gets stopped
svn-id: r50310
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sound/music.cpp5
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();