46 #ifndef __AUMIDIBase_h__
47 #define __AUMIDIBase_h__
52 #include "CAAUMIDIMapManager.h"
55 struct MIDIPacketList;
65 AUMIDIBase(AUBase* inBase);
67 virtual ~AUMIDIBase();
70 ComponentResult MIDIEvent( UInt32 inStatus,
73 UInt32 inOffsetSampleFrame)
75 UInt32 strippedStatus = inStatus & 0xf0;
76 UInt32 channel = inStatus & 0x0f;
78 return HandleMidiEvent(strippedStatus, channel, inData1, inData2, inOffsetSampleFrame);
82 ComponentResult HandleMIDIPacketList(
const MIDIPacketList *pktlist);
85 ComponentResult SysEx(
const UInt8 * inData,
88 #if TARGET_API_MAC_OSX
90 virtual ComponentResult DelegateGetPropertyInfo(AudioUnitPropertyID inID,
91 AudioUnitScope inScope,
92 AudioUnitElement inElement,
94 Boolean & outWritable);
97 virtual ComponentResult DelegateGetProperty( AudioUnitPropertyID inID,
98 AudioUnitScope inScope,
99 AudioUnitElement inElement,
103 virtual ComponentResult DelegateSetProperty( AudioUnitPropertyID inID,
104 AudioUnitScope inScope,
105 AudioUnitElement inElement,
113 virtual OSStatus HandleMidiEvent( UInt8 inStatus,
117 UInt32 inStartFrame);
120 virtual OSStatus HandleNonNoteEvent ( UInt8 status,
124 UInt32 inStartFrame);
126 #if TARGET_API_MAC_OSX
128 virtual ComponentResult GetXMLNames(CFURLRef *outNameDocument)
129 {
return kAudioUnitErr_InvalidProperty; }
134 virtual OSStatus HandleNoteOn( UInt8 inChannel,
137 UInt32 inStartFrame) {
return noErr; }
140 virtual OSStatus HandleNoteOff( UInt8 inChannel,
143 UInt32 inStartFrame) {
return noErr; }
146 virtual OSStatus HandleControlChange( UInt8 inChannel,
149 UInt32 inStartFrame) {
return noErr; }
152 virtual OSStatus HandlePitchWheel( UInt8 inChannel,
155 UInt32 inStartFrame) {
return noErr; }
158 virtual OSStatus HandleChannelPressure( UInt8 inChannel,
160 UInt32 inStartFrame) {
return noErr; }
163 virtual OSStatus HandleProgramChange( UInt8 inChannel,
164 UInt8 inValue) {
return noErr; }
167 virtual OSStatus HandlePolyPressure( UInt8 inChannel,
170 UInt32 inStartFrame) {
return noErr; }
173 virtual OSStatus HandleResetAllControllers(UInt8 inChannel) {
return noErr; }
176 virtual OSStatus HandleAllNotesOff( UInt8 inChannel) {
return noErr; }
179 virtual OSStatus HandleAllSoundOff( UInt8 inChannel) {
return noErr; }
184 virtual OSStatus HandleSysEx(
const UInt8 * inData,
185 UInt32 inLength ) {
return noErr; }
189 CAAUMIDIMapManager *GetMIDIMapManager() {
return mMapManager;};
196 AUBase & mAUBaseInstance;
200 CAAUMIDIMapManager * mMapManager;
206 static ComponentResult ComponentEntryDispatch( ComponentParameters *params,
210 #endif // __AUMIDIBase_h__