aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorFlorian Kagerer2010-08-22 20:37:48 +0000
committerFlorian Kagerer2010-08-22 20:37:48 +0000
commit0348ca3e65292784126920eae38c9376aa113f8a (patch)
treef40773ab927e13d3511ad9a0fae59c4e28fbff16 /engines/scumm
parent4109b40d88991a77e78ae2e6181fdb551f18d19c (diff)
downloadscummvm-rg350-0348ca3e65292784126920eae38c9376aa113f8a.tar.gz
scummvm-rg350-0348ca3e65292784126920eae38c9376aa113f8a.tar.bz2
scummvm-rg350-0348ca3e65292784126920eae38c9376aa113f8a.zip
SCUMM: fix CD audio regression in Monkey Island 1 DOS/CD
svn-id: r52287
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/sound.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index f12625c9e3..708faa5687 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -314,6 +314,30 @@ void Sound::playSound(int soundID) {
stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
_mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
}
+ else if (_vm->_game.platform != Common::kPlatformFMTowns && READ_BE_UINT32(ptr) == MKID_BE('SOUN')) {
+ if (_vm->_game.version != 3)
+ ptr += 2;
+
+ int type = *(ptr + 0x0D);
+
+ if (type == 2) {
+ // CD track resource
+ ptr += 0x16;
+ if (soundID == _currentCDSound && pollCD() == 1)
+ return;
+
+ int track = ptr[0];
+ int loops = ptr[1];
+ int start = (ptr[2] * 60 + ptr[3]) * 75 + ptr[4];
+ int end = (ptr[5] * 60 + ptr[6]) * 75 + ptr[7];
+
+ playCDTrack(track, loops == 0xff ? -1 : loops, start, end <= start ? 0 : end - start);
+ _currentCDSound = soundID;
+ } else {
+ // All other sound types are ignored
+ warning("Scumm::Sound::playSound: encountered audio resoure with chunk type 'SOUN' and sound type %d", type);
+ }
+ }
else if ((_vm->_game.id == GID_LOOM) && (_vm->_game.platform == Common::kPlatformMacintosh)) {
// Mac version of Loom uses yet another sound format
/*