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 ?



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:
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>)



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.