Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIEntityAddOrRemoveEndpoints



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:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

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: http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >MIDIEntityAddOrRemoveEndpoints (From: Arne Scheffler <email@hidden>)
 >Re: MIDIEntityAddOrRemoveEndpoints (From: Luke Bellandi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.