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: MIDIEndpointRef is valid ?




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

This email sent to email@hidden
References: 
 >MIDIEndpointRef is valid ? (From: Bruno Degazio <email@hidden>)
 >Re: MIDIEndpointRef is valid ? (From: Doug Wyatt <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.