Re: Another Endpoint Q
Re: Another Endpoint Q
- Subject: Re: Another Endpoint Q
- From: Herbie Robinson <email@hidden>
- Date: Sat, 7 Sep 2002 01:43:09 -0400
I have another Endpoint related question ...
In a MIDI driver interface, there's a function named
MIDIDriverEnableSource (MIDIEndpointRef src, Boolean enabled),
This passes an EndpointRef and a boolean flag.
The documentation and headers are unclear, but it appears that the
endpoint ref (src) I'm receiving here does not correspond to any
that my driver created on its own ports.
Is that right, is it referring to an external connection ie the
endpoint that is on the other end of the ("virtual") line.
Yes. The driver is running in a different process; so, returning
pointers that the driver sees would not be helpful. Also, because
this is multi-user, the system needs to do something to validate
endpoints so that one user can't shaft everybody else. That means it
can't return a pointer to user code and trust the user code to give
the pointer back. The easiest way to validate is to return a table
index instead of a pointer. The only problem with that is that the
indices get re-used; so, user who uses stale indices can access
another user's port. The solution is to add some uniqueness bits to
the index and mask them off when using the index. I never actually
looked at what is being used, but the hex values you printed out are
consistent with this technique.
Is it a bug ? In my code or CA ?
No and no.
What should/does this EndpointRef refer to ?
You need to treat it as an opaque object (or a handle to an opaque object).
--
-*****************************************
**
http://www.curbside-recording.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.