Re: CoreMidi and Virtual EndPoints
Re: CoreMidi and Virtual EndPoints
- Subject: Re: CoreMidi and Virtual EndPoints
- From: Doug Wyatt <email@hidden>
- Date: Thu, 23 Jan 2003 12:40:02 -0800
On Wednesday, Jan 15, 2003, at 23:13 US/Pacific, Pierre-Olivier Latour
wrote:
Either you create virtual endpoints that are only connectable to other
apps
on your computer, or your app connects directly to a device, but then
other
apps cannot communicate with it (unless they create virtual
endpoints), or
you do both and it's a mess.
Creating both isn't necessarily a mess, it actually provides a good
user experience: the UI for making a connnection is not in a remote
application, but can be put in the best UI context for the the task ...
Say I want my app to be able to receive MIDI from either external
devices or
other apps: if I create a virtual destination endpoint (no UI
required),
other apps can connect to it (since my app appears as a device to
them), but
the user can't connect any hardware device to it. If I create an input
port
that I connect to a selected source (UI required), then only apps that
have
a virtual source will appear in the list.
Do both. Allow the user to choose real and virtual sources to listen
to, in the context of your own application. Or, if you don't care, open
connections to everything.
And create a virtual destination. Then, in the context of other
applications' UI's, users will be able to choose your application as a
destination.
You can use the same MIDIReadProc for both.
Another thing that is missing (unless I haven't seen it) are permanent
references to MIDI sources i.e. Instead of using a simple number from
0 to
n, use an "unique ID" made from the vendor id / product id of the
device or
app, so that if the user changes the midi setup and source numbers
change,
you can still find it using this "unique ID".
Search for "kMIDIPropertyUniqueID" in MIDIServices.h.
Doug
--
Doug Wyatt
email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.com
_______________________________________________
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.