aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-10-02 17:30:26 +0000
committerMax Horn2002-10-02 17:30:26 +0000
commitf3281f93c5ccd751c1aa89f42944d0b44eb4a5e6 (patch)
tree968653e5115555d2b8fdfcedc2b0a654f054983c /scumm
parentba06eab0cecfff45527b32034a26508a857922e3 (diff)
downloadscummvm-rg350-f3281f93c5ccd751c1aa89f42944d0b44eb4a5e6.tar.gz
scummvm-rg350-f3281f93c5ccd751c1aa89f42944d0b44eb4a5e6.tar.bz2
scummvm-rg350-f3281f93c5ccd751c1aa89f42944d0b44eb4a5e6.zip
patch #617419: SAM: sound fix
svn-id: r5075
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sound.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 6a492cbef3..59be2d7367 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -461,6 +461,19 @@ int Sound::startTalkSound(uint32 offset, uint32 b, int mode) {
return -1;
}
+ // 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?
+
+ if (mode == 1 && (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX)) {
+ for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
+ if (i != _talkChannel)
+ _scumm->_mixer->stop(i);
+ }
+ }
+
if (b > 8) {
num = (b - 8) >> 1;
}
@@ -712,17 +725,6 @@ int Sound::startSfxSound(File *file, int file_size) {
int rate, comp;
byte *data;
- // FIXME: Some games frequently assume that starting one sound effect
- // will automatically stop any other that may be playing at that time.
- // Do any other games need this?
-
- if (_scumm->_gameId == GID_TENTACLE || _scumm->_gameId == GID_SAMNMAX) {
- for (int i = 0; i < _scumm->_mixer->NUM_CHANNELS; i++) {
- if (i != _talkChannel)
- _scumm->_mixer->stop(i);
- }
- }
-
#ifdef COMPRESSED_SOUND_FILE
if (file_size > 0) {
data = (byte *)calloc(file_size + MAD_BUFFER_GUARD, 1);