[Scummvm-cvs-logs] CVS: scummvm/scumm imuse_player.cpp,2.17,2.18
Jamieson Christian
jamieson630 at users.sourceforge.net
Thu Aug 7 16:43:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv2010/scummvm/scumm
Modified Files:
imuse_player.cpp
Log Message:
Fix for Bug [780924] IMUSE: Pitchbend isn't reset when changing tracks
When scanning (not jumping) to a target location
in a different track, the current track is first
scanned to the end to update the player state
before starting into the new track.
Miscellaneous scan-related cleanup is included.
Index: imuse_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_player.cpp,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -d -r2.17 -r2.18
--- imuse_player.cpp 6 Aug 2003 18:20:15 -0000 2.17
+++ imuse_player.cpp 7 Aug 2003 23:42:15 -0000 2.18
@@ -336,15 +336,17 @@
return;
#ifdef IMUSE_DEBUG
- for (a = 0; a < len + 1 && a < 19; ++a) {
- sprintf((char *)&buf[a*3], " %02X", p[a]);
- } // next for
- if (a < len + 1) {
- buf[a*3] = buf[a*3+1] = buf[a*3+2] = '.';
- ++a;
- } // end if
- buf[a*3] = '\0';
- debug(0, "[%02d] SysEx:%s", _id, buf);
+ if (!_scanning) {
+ for (a = 0; a < len + 1 && a < 19; ++a) {
+ sprintf((char *)&buf[a*3], " %02X", p[a]);
+ } // next for
+ if (a < len + 1) {
+ buf[a*3] = buf[a*3+1] = buf[a*3+2] = '.';
+ ++a;
+ } // end if
+ buf[a*3] = '\0';
+ debug(0, "[%02d] SysEx:%s", _id, buf);
+ }
#endif
switch (code = *p++) {
@@ -826,6 +828,11 @@
clear_active_notes();
_scanning = true;
+ // If the scan involves a track switch, scan to the end of
+ // the current track so that our state when starting the
+ // new track is fully up to date.
+ if (totrack != _track_index)
+ _parser->jumpToTick (-1, true);
_parser->setTrack(totrack);
if (!_parser->jumpToTick((tobeat - 1) * TICKS_PER_BEAT + totick, true)) {
_scanning = false;
More information about the Scummvm-git-logs
mailing list