aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-08-09 00:58:21 +0000
committerTravis Howell2004-08-09 00:58:21 +0000
commitdc476abe6021806a8cc30935c91ffabb8e766829 (patch)
tree9c00f1d47dc3ee75c213d2f309b481051c783f74 /scumm/sound.cpp
parent809c3bd943df6a180ba40e015e01394a51a3da86 (diff)
downloadscummvm-rg350-dc476abe6021806a8cc30935c91ffabb8e766829.tar.gz
scummvm-rg350-dc476abe6021806a8cc30935c91ffabb8e766829.tar.bz2
scummvm-rg350-dc476abe6021806a8cc30935c91ffabb8e766829.zip
Fix bug #780922 - SAM: Conroy doesn't stop singing when escaping cutscene
svn-id: r14524
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index d3cb4341c8..a055aa44e8 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -64,6 +64,7 @@ Sound::Sound(ScummEngine *parent)
_talk_sound_b1(0),
_talk_sound_b2(0),
_talk_sound_mode(0),
+ _talk_sound_channel(0),
_mouthSyncMode(false),
_endOfMouthSync(false),
_curSoundPos(0),
@@ -623,15 +624,9 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle
// Some games frequently assume that starting one sound effect will
// automatically stop any other that may be playing at that time. So
// that is what we do here, but we make an exception for speech.
- //
- // Do any other games than these need this hack?
- //
- // HACK: Checking for script 99 in Sam & Max is to keep Conroy's song
- // from being interrupted.
- if (mode == 1 && (_vm->_gameId == GID_TENTACLE
- || (_vm->_gameId == GID_SAMNMAX && !_vm->isScriptRunning(99)))) {
- id = 777777;
+ if (mode == 1 && (_vm->_gameId == GID_TENTACLE || _vm->_gameId == GID_SAMNMAX)) {
+ id = 777777 + _talk_sound_channel;
_vm->_mixer->stopID(id);
}
@@ -875,10 +870,11 @@ void Sound::soundKludge(int *list, int num) {
}
}
-void Sound::talkSound(uint32 a, uint32 b, int mode) {
+void Sound::talkSound(uint32 a, uint32 b, int mode, int channel) {
if (mode == 1) {
_talk_sound_a1 = a;
_talk_sound_b1 = b;
+ _talk_sound_channel = channel;
} else {
_talk_sound_a2 = a;
_talk_sound_b2 = b;