Re: just how stable is kMIDIPropertyUniqueID ?
Re: just how stable is kMIDIPropertyUniqueID ?
- Subject: Re: just how stable is kMIDIPropertyUniqueID ?
- From: "Ross Bencina" <email@hidden>
- Date: Wed, 5 Aug 2009 13:11:07 +1000
Thanks very much for your reply Doug, I think that clears things up.
Ross.
----- Original Message -----
From: "Doug Wyatt" <email@hidden>
To: "Ross Bencina" <email@hidden>
Cc: <email@hidden>
Sent: Wednesday, August 05, 2009 5:29 AM
Subject: Re: just how stable is kMIDIPropertyUniqueID ?
On Jul 31, 2009, at 0:12 , Ross Bencina wrote:
Hi Guys
There was a related thread a while ago:
Re: Is the kMIDIPropertyUniqueID the same between reboots?
http://lists.apple.com/archives/Coreaudio-api/2004/Mar/msg00049.html
But I have a few more specific questions about kMIDIPropertyUniqueID:
I'll preface my answer with a caveat:
The behavior is entirely dependent on the driver. The driver is
responsible for making the decision about whether a device it sees
right now is the same device that was present previously.
If a device has two unnamed endpoints with unnamed entities, will the
endpoint IDs be stable accross reboots/device connections? The Akai
MPD24
driver seems to fall into this category and I'm not yet sure how to
safely
differentiate between the endpoints. Are the order of entities
within an
device, and endpoints within an entity guaranteed to be stable?
This too is driver-dependent. In the case of the Apple USB, network,
and IAC drivers, the answer is yes.
If a MIDI device is connected to a different USB port / through a
different
hub, will its kMIDIPropertyUniqueID be the same?
I assume you're really asking about USB-MIDI devices (not plain MIDI
devices. Sorry if this is being pedantic, just wanting to be clear.)
The answer is, it depends on whether there is more than one device
with that same USB vendor/product ID. If there is only one, and it
gets reconnected at a different location, then effectively, the system
sees one device that "moved."
What about if two identical MIDI devices are then reconnected through
different ports/hubs?
If the devices happen to present serial numbers over USB, then that
makes everything foolproof and moves are successfully tracked.
Otherwise, hopefully one of the two instances of didn't move. Devices
that didn't move get successfully tracked. If both devices move, and
neither has a serial number, then I think the driver can only guess.
Is device order (for the MIDIGetDevice collection) stable for a given
USB/Firewire topology? or does it depend on connect/reconnect
ordering?
Please do not depend at all on that; it is an arbitrary function of
the order in which IOKit presents the devices and in the way the
implementation chooses to mutate its collections. (That said, I
believe the ordering from IOKit is used by the USB driver to inform
the guesses it makes in the case above, where two or more devices move.)
HTH,
Doug
_______________________________________________
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