[Scummvm-cvs-logs] CVS: scummvm/sound midiparser.cpp,1.16,1.17

Jamieson Christian jamieson630 at users.sourceforge.net
Thu Aug 7 16:43:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv2010/scummvm/sound

Modified Files:
	midiparser.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: midiparser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/midiparser.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- midiparser.cpp	31 Jul 2003 06:50:13 -0000	1.16
+++ midiparser.cpp	7 Aug 2003 23:42:15 -0000	1.17
@@ -330,19 +330,14 @@
 
 			if (info.event == 0xFF) {
 				if (info.ext.type == 0x2F) { // End of track
-					if (_autoLoop) {
-						_position._play_pos = _tracks[_active_track];
-						parseNextEvent (_next_event);
-					} else {
-						_position = currentPos;
-						_next_event = currentEvent;
-						return false;
-					}
-					break;
-				} else if (info.ext.type == 0x51) { // Tempo
-					if (info.length >= 3) {
+					_position = currentPos;
+					_next_event = currentEvent;
+					return false;
+				} else {
+					if (info.ext.type == 0x51 && info.length >= 3) // Tempo
 						setTempo (info.ext.data[0] << 16 | info.ext.data[1] << 8 | info.ext.data[2]);
-					}
+					if (fireEvents)
+						_driver->metaEvent (info.ext.type, info.ext.data, (uint16) info.length);
 				}
 			} else if (fireEvents) {
 				if (info.event == 0xF0)





More information about the Scummvm-git-logs mailing list