Re: MIDIEntityAddOrRemoveEndpoints
Re: MIDIEntityAddOrRemoveEndpoints
- Subject: Re: MIDIEntityAddOrRemoveEndpoints
- From: Arne Scheffler <email@hidden>
- Date: Mon, 13 Dec 2004 20:41:03 +0100
I don't know if I'm the only one, who thinks that this doc is wrong.
If you look at the param description you see that it notices a device
which is not in the function definition. And if you look in the header
and see the description of the function ahead of this one, you will see
that it has the same text ;-)
But anyway, do you have some sample code lying around which shows how
to use this ?
thanks
arne
On Dec 13, 2004, at 8:21 PM, Luke Bellandi wrote:
Hi Arne,
On Dec 13, 2004, at 9:58 AM, Arne Scheffler wrote:
Hi,
what does MIDIEntityAddOrRemoveEndpoints do ? The documentation in
the header and in the html file are wrong.
And I would like to know if it is possible to setup CoreMIDI with the
CoreMIDI API like the Audio/Midi Setup App ?
The documentation I have says:
>>>>>>>>>>
//
-----------------------------------------------------------------------
------
/*!
@function MIDIEntityAddOrRemoveEndpoints
@discussion Drivers may call this function to add to or remove an
entity's endpoints.
New for CoreMIDI 1.3.
@param device
The device from which an entity is to be removed.
@param entity
The entity to be removed.
@result An OSStatus result code.
*/
extern OSStatus
MIDIEntityAddOrRemoveEndpoints(MIDIEntityRef entity, ItemCount
numSourceEndpoints,
ItemCount numDestinationEndpoints)
<<<<<<<<<<
The docs are correct. What may be unclear is that you're supposed to
pass in the desired number of source/destination endpoints you want it
to have on outcome (not delta values). So if you want your entity to
have 2 endpoints in and 4 out, call it with
MIDIEntityAddOrRemoveEndpoints (entity, 2, 4).
This is the API that Audio MIDI Setup uses to reconfigure external
MIDI devices, so you can do this sort of configuration just as AMS
can.
Best,
Luke
cheers
arne
_______________________________________________
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
_______________________________________________
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