From d54a57cceea0bff3b0dac9755363f21f2e965924 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 29 Mar 2013 01:17:23 +0200 Subject: 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 --- engines/sci/sound/soundcmd.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'engines') 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) { -- cgit v1.2.3