aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2010-01-02 18:16:12 +0000
committerWillem Jan Palenstijn2010-01-02 18:16:12 +0000
commit5c56d726b28287cdc7b8054238007efd3f97860d (patch)
treebadc26fcb2b48ed8d47b575816b5c5fa937fb30b /engines/sci
parentc920abf50a5e6ca94045e08a7e6a1e7fa31ab6f7 (diff)
downloadscummvm-rg350-5c56d726b28287cdc7b8054238007efd3f97860d.tar.gz
scummvm-rg350-5c56d726b28287cdc7b8054238007efd3f97860d.tar.bz2
scummvm-rg350-5c56d726b28287cdc7b8054238007efd3f97860d.zip
SCI/new music code: Improve midi hold handling a bit. Still broken.
svn-id: r46893
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sfx/midiparser.cpp14
-rw-r--r--engines/sci/sfx/soundcmd.cpp6
2 files changed, 11 insertions, 9 deletions
diff --git a/engines/sci/sfx/midiparser.cpp b/engines/sci/sfx/midiparser.cpp
index 84d84c79ab..87cbfb48d6 100644
--- a/engines/sci/sfx/midiparser.cpp
+++ b/engines/sci/sfx/midiparser.cpp
@@ -144,10 +144,18 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
// TODO: Not implemented yet
break;
case kMidiHold:
- // Check if the hold ID marker is the same as the hold ID marker set for that song by
- // cmdSetSoundHold. If it is, set the loop position
+ // Check if the hold ID marker is the same as the hold ID
+ // marker set for that song by cmdSetSoundHold.
+ // If it is, loop back
+
+ // FIXME: this is currently broken, as seen in the
+ // scene in LSL5 where Larry first arrives at the airport
+ // in the limo. The engine sound is stopped instead of
+ // continuing. As a possible direction to look at for a fix,
+ // removing the allNotesOff() call in jumpToTick() lets the
+ // engine sound continue.
if (info.basic.param2 == _pSnd->hold)
- _loopTick = _position._play_tick;
+ jumpToTick(_loopTick);
break;
case kUpdateCue:
switch (_soundVersion) {
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index e8e599bc5c..0c7cccbfb4 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -859,13 +859,7 @@ void SoundCommandParser::cmdSetSoundHold(reg_t obj, int16 value) {
}
// Set the special hold marker ID where the song should be looped at.
- // If the hold marker is 0, stop the song, as songs with a hold marker
- // embedded don't have an end of track signal at the end, so that they
- // loop instead of stopping
musicSlot->hold = value;
-
- if (!value)
- cmdStopSound(obj, 0);
#endif
}