[Scummvm-cvs-logs] SF.net SVN: scummvm:[46897] scummvm/trunk
wjpalenstijn at users.sourceforge.net
wjpalenstijn at users.sourceforge.net
Sat Jan 2 21:20:40 CET 2010
Revision: 46897
http://scummvm.svn.sourceforge.net/scummvm/?rev=46897&view=rev
Author: wjpalenstijn
Date: 2010-01-02 20:20:36 +0000 (Sat, 02 Jan 2010)
Log Message:
-----------
SCI/new music code: Don't stop notes when looping for a hold
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/midiparser.cpp
scummvm/trunk/sound/midiparser.cpp
scummvm/trunk/sound/midiparser.h
Modified: scummvm/trunk/engines/sci/sfx/midiparser.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/midiparser.cpp 2010-01-02 19:24:52 UTC (rev 46896)
+++ scummvm/trunk/engines/sci/sfx/midiparser.cpp 2010-01-02 20:20:36 UTC (rev 46897)
@@ -146,16 +146,9 @@
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, 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 it is, loop back, but don't stop notes when jumping.
if (info.basic.param2 == _pSnd->hold)
- jumpToTick(_loopTick);
+ jumpToTick(_loopTick, false, false);
break;
case kUpdateCue:
switch (_soundVersion) {
Modified: scummvm/trunk/sound/midiparser.cpp
===================================================================
--- scummvm/trunk/sound/midiparser.cpp 2010-01-02 19:24:52 UTC (rev 46896)
+++ scummvm/trunk/sound/midiparser.cpp 2010-01-02 20:20:36 UTC (rev 46897)
@@ -353,7 +353,7 @@
}
}
-bool MidiParser::jumpToTick(uint32 tick, bool fireEvents) {
+bool MidiParser::jumpToTick(uint32 tick, bool fireEvents, bool stopNotes) {
if (_active_track >= _num_tracks)
return false;
@@ -402,18 +402,20 @@
}
}
- if (!_smartJump || !currentPos._play_pos) {
- allNotesOff();
- } else {
- EventInfo targetEvent(_next_event);
- Tracker targetPosition(_position);
+ if (stopNotes) {
+ if (!_smartJump || !currentPos._play_pos) {
+ allNotesOff();
+ } else {
+ EventInfo targetEvent(_next_event);
+ Tracker targetPosition(_position);
- _position = currentPos;
- _next_event = currentEvent;
- hangAllActiveNotes();
+ _position = currentPos;
+ _next_event = currentEvent;
+ hangAllActiveNotes();
- _next_event = targetEvent;
- _position = targetPosition;
+ _next_event = targetEvent;
+ _position = targetPosition;
+ }
}
_abort_parse = true;
Modified: scummvm/trunk/sound/midiparser.h
===================================================================
--- scummvm/trunk/sound/midiparser.h 2010-01-02 19:24:52 UTC (rev 46896)
+++ scummvm/trunk/sound/midiparser.h 2010-01-02 20:20:36 UTC (rev 46897)
@@ -379,7 +379,7 @@
void stopPlaying();
bool setTrack(int track);
- bool jumpToTick(uint32 tick, bool fireEvents = false);
+ bool jumpToTick(uint32 tick, bool fireEvents = false, bool stopNotes = true);
uint32 getPPQN() { return _ppqn; }
virtual uint32 getTick() { return _position._play_tick; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list