From 69adb13c2f3cadd4dac2bba8164aa0b8a9400abc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Jul 2011 02:27:33 +0200 Subject: 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. --- engines/scumm/sound.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/scumm') 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); -- cgit v1.2.3