diff options
author | Willem Jan Palenstijn | 2013-09-21 11:10:40 -0700 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-09-21 11:10:40 -0700 |
commit | a0e0b21d91e6addb2524dc5ff5477892630b0d20 (patch) | |
tree | 4a410f6c32f452afaef54c43119730cf6b53c60b /audio/midiparser.h | |
parent | 97b255ab33fa5fcd4507573e77cd42a8406e1b55 (diff) | |
parent | 4b5ca10f68effb88e297d72f6ea366d760acf9ed (diff) | |
download | scummvm-rg350-a0e0b21d91e6addb2524dc5ff5477892630b0d20.tar.gz scummvm-rg350-a0e0b21d91e6addb2524dc5ff5477892630b0d20.tar.bz2 scummvm-rg350-a0e0b21d91e6addb2524dc5ff5477892630b0d20.zip |
Merge pull request #398 from wjp/sci_midiparser
SCI: Move MIDI event processing out of parseNextEvent
Diffstat (limited to 'audio/midiparser.h')
-rw-r--r-- | audio/midiparser.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/midiparser.h b/audio/midiparser.h index bb9749b97f..05d0cbe1db 100644 --- a/audio/midiparser.h +++ b/audio/midiparser.h @@ -105,8 +105,8 @@ struct EventInfo { ///< will occur, and the MidiParser will have to generate one itself. ///< For all other events, this value should always be zero. - byte channel() { return event & 0x0F; } ///< Separates the MIDI channel from the event. - byte command() { return event >> 4; } ///< Separates the command code from the event. + byte channel() const { return event & 0x0F; } ///< Separates the MIDI channel from the event. + byte command() const { return event >> 4; } ///< Separates the command code from the event. }; /** @@ -287,12 +287,14 @@ protected: ///< so each event is parsed only once; this permits ///< simulated events in certain formats. bool _abortParse; ///< If a jump or other operation interrupts parsing, flag to abort. + bool _jumpingToTick; ///< True if currently inside jumpToTick protected: static uint32 readVLQ(byte * &data); virtual void resetTracking(); virtual void allNotesOff(); virtual void parseNextEvent(EventInfo &info) = 0; + virtual void processEvent(const EventInfo &info, bool fireEvents = true); void activeNote(byte channel, byte note, bool active); void hangingNote(byte channel, byte note, uint32 ticksLeft, bool recycle = true); |