Re: MIDIEndpointRef is valid ?
Re: MIDIEndpointRef is valid ?
- Subject: Re: MIDIEndpointRef is valid ?
- From: Bruno Degazio <email@hidden>
- Date: Wed, 14 Jun 2006 20:48:25 -0400
On Jun 14, 2006, at 4:58 PM, Doug Wyatt wrote:
By "valid" do you mean that the object really exists?
Yes - I found that some CoreMIDI calls crash if using an old EndPoint
(from a previously saved file, for example), so I got in the habit of
checking them first
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.
That sounds like exactly what I was looking for!
Bruno
_______________________________________________
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