Re: MIDIEndpointRef is valid ?
Re: MIDIEndpointRef is valid ?
- Subject: Re: MIDIEndpointRef is valid ?
- From: Doug Wyatt <email@hidden>
- Date: Wed, 14 Jun 2006 13:58:03 -0700
By "valid" do you mean that the object really exists?
In general you should be looking at the change notifications on your
client's notification callback, and when things change, be prepared
to "forget" any references to objects which are no longer present.
If you want to do a sanity check on whether a device/entity/endpoint
is valid, you could call MIDIObjectGetIntegerProperty for
kMIDIPropertyUniqueID and check for an error return value.
Doug
On Jun 14, 2006, at 11:58 , Bruno Degazio wrote:
When using CoreMIDI, what is the best way to determine whether a
given EndPointRef is valid? I've been using MIDIEndpointGetEntity
as a safe way to check since it returns 0 for a valid endpoint, but
it doesn't work for virtual endpoints.
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
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