aboutsummaryrefslogtreecommitdiff
path: root/audio/midiparser_qt.h
diff options
context:
space:
mode:
authorMatthew Hoops2012-09-10 08:22:00 -0400
committerMatthew Hoops2012-09-10 08:23:11 -0400
commitc023651cb37752a7dd5e53a7bb27f20dbc9fd41e (patch)
tree9dc39abe044dc5e8ec57bb9e9da9f36a671b59b3 /audio/midiparser_qt.h
parentcfe6a2b640e91cf11a32017e79966121bf357cc7 (diff)
downloadscummvm-rg350-c023651cb37752a7dd5e53a7bb27f20dbc9fd41e.tar.gz
scummvm-rg350-c023651cb37752a7dd5e53a7bb27f20dbc9fd41e.tar.bz2
scummvm-rg350-c023651cb37752a7dd5e53a7bb27f20dbc9fd41e.zip
AUDIO: Implement QuickTime MIDI channel remapping
Needed to support channels with a drum kit
Diffstat (limited to 'audio/midiparser_qt.h')
-rw-r--r--audio/midiparser_qt.h9
1 files changed, 9 insertions, 0 deletions
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<MIDITrackInfo> _trackInfo;
+ typedef Common::HashMap<uint, uint> ChannelMap;
+ ChannelMap _channelMap;
+
void initFromContainerTracks();
void initCommon();
uint32 readUint32();