aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2013-03-29 01:17:23 +0200
committerFilippos Karapetis2013-03-29 01:25:35 +0200
commitd54a57cceea0bff3b0dac9755363f21f2e965924 (patch)
treebaedc1149e0ef7ce6760668d5748bdf4122428d8 /engines
parent7f1288e8ef3b06d2d0793070da083b2e9c6bc030 (diff)
downloadscummvm-rg350-d54a57cceea0bff3b0dac9755363f21f2e965924.tar.gz
scummvm-rg350-d54a57cceea0bff3b0dac9755363f21f2e965924.tar.bz2
scummvm-rg350-d54a57cceea0bff3b0dac9755363f21f2e965924.zip
SCI: Stop and clear sounds that have no data. Fixes an issue in KQ6 Mac
Thanks to waltervn and clone2727 for the original patch. Tested LSL5 with this change, and the problematic sound in the mud wrestling scene is handled correctly
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sound/soundcmd.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index a76b3b3876..4d12d95dc7 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -501,12 +501,15 @@ void SoundCommandParser::processUpdateCues(reg_t obj) {
processStopSound(obj, false);
}
} else {
- // Slot actually has no data (which would mean that a sound-resource w/
- // unsupported data is used.
- // (example lsl5 - sound resource 744 - it's Roland exclusive
- writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
- // If we don't set signal here, at least the switch to the mud wrestling
- // room in lsl5 will not work.
+ // The sound slot has no data for the currently selected sound card.
+ // An example can be found during the mud wrestling scene in LSL5, room
+ // 730: sound 744 (a splat sound heard when Lana Luscious jumps in the
+ // mud) only contains MIDI channel data. If a non-MIDI sound card is
+ // selected (like Adlib), then the scene freezes. We also need to stop
+ // the sound at this point, otherwise KQ6 Mac breaks because the rest
+ // of the object needs to be reset to avoid a continuous stream of
+ // sound cues.
+ processStopSound(obj, true); // this also sets the signal selector
}
if (musicSlot->fadeCompleted) {