From c023651cb37752a7dd5e53a7bb27f20dbc9fd41e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 10 Sep 2012 08:22:00 -0400 Subject: AUDIO: Implement QuickTime MIDI channel remapping Needed to support channels with a drum kit --- audio/midiparser_qt.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'audio/midiparser_qt.h') diff --git a/audio/midiparser_qt.h b/audio/midiparser_qt.h index 5ab89bd4e7..25c2ae99fb 100644 --- a/audio/midiparser_qt.h +++ b/audio/midiparser_qt.h @@ -25,6 +25,7 @@ #include "audio/midiparser.h" #include "common/array.h" +#include "common/hashmap.h" #include "common/quicktime.h" /** @@ -57,6 +58,7 @@ public: protected: // MidiParser void parseNextEvent(EventInfo &info); + void resetTracking(); // QuickTimeParser SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize); @@ -80,10 +82,17 @@ private: uint32 readNextEvent(EventInfo &info); void handleGeneralEvent(EventInfo &info, uint32 control); + void allocateChannel(uint32 part, uint32 instrument); + byte getChannel(uint32 part) const; + bool isChannelAllocated(byte channel) const; + byte *readWholeTrack(Common::QuickTimeParser::Track *track, uint32 &trackSize); Common::Array _trackInfo; + typedef Common::HashMap ChannelMap; + ChannelMap _channelMap; + void initFromContainerTracks(); void initCommon(); uint32 readUint32(); -- cgit v1.2.3