[Scummvm-cvs-logs] CVS: scummvm/sound midiparser.cpp,1.11,1.12
Jamieson Christian
jamieson630 at users.sourceforge.net
Sun Jun 1 11:34:05 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.119,1.120 actor.h,1.30,1.31 costume.cpp,1.55,1.56 script_v5.cpp,1.108,1.109 script_v6.cpp,1.147,1.148
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse_player.cpp,2.11,2.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv27997/scummvm/sound
Modified Files:
midiparser.cpp
Log Message:
Fixed hanging notes on Smart Jump when Note Off event cannot be found.
(I'm not sure why the Note Off would not be found,
but at least we're properly dealing with such notes now.)
Index: midiparser.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/midiparser.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- midiparser.cpp 25 May 2003 15:46:47 -0000 1.11
+++ midiparser.cpp 1 Jun 2003 18:24:10 -0000 1.12
@@ -276,7 +276,7 @@
// accounted for every active note.
uint32 advance_tick = _position._last_event_tick;
while (true) {
- int i;
+ int i, j;
for (i = 0; i < 128; ++i)
if (_active_notes[i] != 0) break;
if (i == 128) break;
@@ -289,6 +289,12 @@
}
} else if (_next_event.event == 0xFF && _next_event.ext.type == 0x2F) {
// printf ("MidiParser::hangAllActiveNotes(): Hit End of Track with active notes left!\n");
+ for (i = 0; i < 128; ++i) {
+ for (j = 0; j < 16; ++j) {
+ if (_active_notes[i] & (1 << j))
+ _driver->send (0x80 | j | i << 8);
+ }
+ }
memset (_active_notes, 0, sizeof (_active_notes));
break;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.119,1.120 actor.h,1.30,1.31 costume.cpp,1.55,1.56 script_v5.cpp,1.108,1.109 script_v6.cpp,1.147,1.148
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse_player.cpp,2.11,2.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list