aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorJohannes Schickel2011-07-17 02:27:33 +0200
committerJohannes Schickel2011-07-17 02:27:33 +0200
commit69adb13c2f3cadd4dac2bba8164aa0b8a9400abc (patch)
tree62cf2466c42aaba18609d12735d07d832a9ecb81 /engines/scumm
parent8800794f4d89f9f920a623dd39cd9d4cf370f827 (diff)
downloadscummvm-rg350-69adb13c2f3cadd4dac2bba8164aa0b8a9400abc.tar.gz
scummvm-rg350-69adb13c2f3cadd4dac2bba8164aa0b8a9400abc.tar.bz2
scummvm-rg350-69adb13c2f3cadd4dac2bba8164aa0b8a9400abc.zip
SCUMM: Fix strange noise in Indy4 outro with AdLib/FM-Towns output.
Formerly we tried to play back a ROL resource on AdLib in this case, since the game does not contain a ADL resource for the sound the game tries to play here. The original does not exhibit this behavior, thus I changed it to behave the same now. Big thanks to eriktorbjorn for noticing and finding the cause of this problem. Also thanks to Kirben for checking how the original behaved and _athrxx for checking the FM-Towns version of Indy4.
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/sound.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 4d9086b22a..c3cad19fdc 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1148,6 +1148,16 @@ int ScummEngine::readSoundResource(ResId idx) {
if ((_musicType == MDT_PCSPK || _musicType == MDT_PCJR || _musicType == MDT_CMS) && pri != 11)
pri = -1;
+ // We only allow ADL resources when AdLib or FM-Towns is used as
+ // primary audio output. This fixes some odd sounds when Indy and
+ // Sophia leave Atlantis with the submarine in Indy4. (Easy to
+ // check with bootparam 4061 in the CD version). It seems the game
+ // only contains a ROL resource for sound id 60. Formerly we tried
+ // to play that via the AdLib or FM-Towns audio driver resulting
+ // in strange noises. Now we behave like the original did.
+ if ((_musicType == MDT_ADLIB || _musicType == MDT_TOWNS) && pri != 10)
+ pri = -1;
+
debugC(DEBUG_RESOURCE, " tag: %s, total_size=%d, pri=%d", tag2str(tag), size, pri);