Re: Creating a Virtual coremidi SOURCE
Re: Creating a Virtual coremidi SOURCE
- Subject: Re: Creating a Virtual coremidi SOURCE
- From: Doug Wyatt <email@hidden>
- Date: Thu, 10 Jul 2003 09:36:44 -0700
On Thursday, Jul 10, 2003, at 05:49 US/Pacific, Mark Gilbert wrote:
Folks.
My app needs to communicate bi-directionally via Midi with another
application on the same CPU.
I am able to create a Virtual DESTINATION core midi port, which
appears as a target for the other app to reply to my app, but I am
not clear how to create a Virtual SOURCE, which the other app can pick
up incoming data from.
Can anyone advise.
MIDIEndpointRef sourceEndpoint;
OSStatus err = MIDISourceCreate(myClientRef, CFSTR("My virtual
source"), &sourceEndpoint);
Your source will then appear in the sources returned by
MIDIGetNumberOfSources / MIDIGetSource.
Other clients may then call MIDIPortConnectSource on your source.
When your source wants to send:
MIDIPacketList *packetListToSend = .......;
MIDIReceived(sourceEndpoint, packetListToSend);
hth,
Doug
_______________________________________________
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.