Re: How to uniquely identify audio device
Re: How to uniquely identify audio device
- Subject: Re: How to uniquely identify audio device
- From: Brian Willoughby <email@hidden>
- Date: Tue, 18 Dec 2007 21:51:16 -0800
You'll not find a better solution than the CoreAudio UID, even
considering the limitations of a subset of USB devices. You don't
want to try to roll your own.
Rather than keep only a single selection, why not keep an ordered
list of recent selections? At most, users with poorly-designed USB
devices will only have to manually select the device once for each
port that they use. Many Macs only have one or two USB ports, and
most users will not arbitrarily change ports. When starting your
application, if the top-selected device is not available, move down
the list until they are exhausted. When the user makes a new
selection, it should be added to the list if absent, and moved to the
front of the list.
You might also want to consider what should happen to your
application's selection when a device is attached after launch.
Brian Willoughby
Sound Consulting
On Dec 18, 2007, at 20:31, Lorenzo Thurman wrote:
But it looks like if its USB device (maybe firewire as well), the UID
will be different if the device is connected to another port. This
makes it a bit problematic, but I suppose I may have to rely on the
identifier string since a device can't change its name. Although
future versions of the same device might.
_______________________________________________
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