Removing MIDI channel mappings to an AU
Removing MIDI channel mappings to an AU
- Subject: Removing MIDI channel mappings to an AU
- From: Rick Cohen <email@hidden>
- Date: Thu, 02 Mar 2006 16:18:37 -0500
I am attempting to use AUMIDIControllerMapChannelToAU() in the
prescribed manner in a simple host program, similar to the "Audio Unit
Hosting" example.
I am finding that once I have established a mapping such as this one...
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
0, // input ch 1
mTargetUnit,
0, // dest ch 1
false );
Then my music device AU receives MIDI events that were transmitted on
channel 1.
But if I try to reassign the input channel to 2 like this...
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
0, // input ch 1
0, // disconnect
0, // dest ch 1
false );
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
1, // input ch 2
mTargetUnit,
0, // dest ch 1
false );
Now my AU is responding to MIDI events received on channels 1 and 2.
The follow-on question is also, if I allow my AU to receive events on
all MIDI channels...
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
-1, // all channels
mTargetUnit,
0, // dest ch 1
false );
how can I remove that mapping? Would I need to disconnect all 16 MIDI
input channels individually, or should a single function call suffice?
Thanks in advance!
- Rick Cohen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden