aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-08-15 11:37:57 +0000
committerTorbjörn Andersson2010-08-15 11:37:57 +0000
commit6ff151b9ef704ae76fa9a4284f6ad7a9c75e1d14 (patch)
treed7e09be82f2e11e7ff942b01f00633ad0872ac90 /engines/scumm
parentaf3dd709382b1462780e196dc3b866ff36975651 (diff)
downloadscummvm-rg350-6ff151b9ef704ae76fa9a4284f6ad7a9c75e1d14.tar.gz
scummvm-rg350-6ff151b9ef704ae76fa9a4284f6ad7a9c75e1d14.tar.bz2
scummvm-rg350-6ff151b9ef704ae76fa9a4284f6ad7a9c75e1d14.zip
SCUMM: Fix bug #3024173 - LOOM-PCE: Music stops prematurely
Apparently, the original interpreter hard-coded the lengths of the audio tracks on the CD, and in this particular case it makes a difference that one of the tracks is slightly longer on the disc than the scripts assume it is. Thanks to hennymcc for doing all the hard work in figuring this out. svn-id: r52098
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/sound.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 61445b21eb..28f1372746 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -170,7 +170,18 @@ void Sound::playSound(int soundID) {
static const char tracks[20] = {3, 4, 5, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 19, 20, 21};
_currentCDSound = soundID;
- playCDTrack(tracks[soundID - 13], 1, 0, 0);
+
+ // The original game had hard-coded lengths for all
+ // tracks, but this one track is the only one (as far
+ // as we know) where this actually matters. See bug
+ // #3024173 - LOOM-PCE: Music stops prematurely.
+
+ int track = tracks[soundID - 13];
+ if (track == 6) {
+ playCDTrack(track, 1, 0, 260);
+ } else {
+ playCDTrack(track, 1, 0, 0);
+ }
} else {
if (_vm->_musicEngine) {
_vm->_musicEngine->startSound(soundID);