diff options
author | Jamieson Christian | 2003-05-20 03:27:45 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-05-20 03:27:45 +0000 |
commit | 46a0be5ae817d9757630c55d0ef1954b5b634068 (patch) | |
tree | a22deaf07db5ec89a6032de30158bef83dd5f8e4 /sound | |
parent | b5e54031967fbe31fa7a3468e2f83c41b5b16139 (diff) | |
download | scummvm-rg350-46a0be5ae817d9757630c55d0ef1954b5b634068.tar.gz scummvm-rg350-46a0be5ae817d9757630c55d0ef1954b5b634068.tar.bz2 scummvm-rg350-46a0be5ae817d9757630c55d0ef1954b5b634068.zip |
Fixed regression in XMIDI parsing.
svn-id: r7706
Diffstat (limited to 'sound')
-rw-r--r-- | sound/midiparser.h | 4 | ||||
-rw-r--r-- | sound/midiparser_xmidi.cpp | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sound/midiparser.h b/sound/midiparser.h index 7f9478f6e1..63d711a640 100644 --- a/sound/midiparser.h +++ b/sound/midiparser.h @@ -70,8 +70,8 @@ protected: protected: static uint32 readVLQ (byte * &data); - void resetTracking(); - void allNotesOff(); + virtual void resetTracking(); + virtual void allNotesOff(); virtual void parseNextEvent (EventInfo &info) = 0; // Multi-byte read helpers diff --git a/sound/midiparser_xmidi.cpp b/sound/midiparser_xmidi.cpp index 202443101c..407366301d 100644 --- a/sound/midiparser_xmidi.cpp +++ b/sound/midiparser_xmidi.cpp @@ -46,6 +46,8 @@ protected: protected: uint32 readVLQ2 (byte * &data); + void allNotesOff(); + void resetTracking(); void parseNextEvent (EventInfo &info); public: @@ -332,4 +334,18 @@ void MidiParser_XMIDI::unloadMusic() { _active_track = 255; } +void MidiParser_XMIDI::allNotesOff() { + MidiParser::allNotesOff(); + + // Reset the list of active notes. + int i; + for (i = 0; i < ARRAYSIZE(_notes_cache); ++i) + _notes_cache[i].off_time = 0; +} + +void MidiParser_XMIDI::resetTracking() { + MidiParser::resetTracking(); + _inserted_delta = 0; +} + MidiParser *MidiParser::createParser_XMIDI() { return new MidiParser_XMIDI; } |