Using MIDIThruConnection.h
Using MIDIThruConnection.h
- Subject: Using MIDIThruConnection.h
- From: Geoff <email@hidden>
- Date: Wed, 24 Sep 2003 14:42:42 +1000
I'm trying to make use of MIDIThruConnection.h. I can't find any
documentation that says more than the header file itself. The following
function is a result of my stumbling in the dark and even though I
don't get an error when it runs I don't get any thruing happening.
I can still get MIDI from the source and send MIDI to the destination
successfully. Perhaps there's something I'm missing? Does anybody out
there know how this works?
OSStatus SetThroughConnect(MIDIEndpointRef iFromRef, MIDIEndpointRef
iToRef, MIDIThruConnectionRef* oThroughRef)
{
OSStatus vError;
MIDIThruConnectionParams* vParams;
CFDataRef vDataRef;
vParams = new MIDIThruConnectionParams;
MIDIThruConnectionParamsInitialize(vParams);
vParams->numSources = one;
vParams->sources[zero].endpointRef = iFromRef;
vParams->numDestinations = one;
vParams->destinations[zero].endpointRef = iToRef;
vDataRef = CFDataCreate(NULL, (byte*)vParams,
sizeof(MIDIThruConnectionParams));
vError = MIDIThruConnectionCreate(NULL, vDataRef, oThroughRef);
CFRelease(vDataRef);
delete vParams;
return vError;
}
Cheers Geoff %^>
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.