Re: How to uniquely identify audio device
Re: How to uniquely identify audio device
- Subject: Re: How to uniquely identify audio device
- From: Lorenzo Thurman <email@hidden>
- Date: Wed, 19 Dec 2007 08:04:48 -0600
Brian Willoughby wrote:
No need to waste CPU cycles polling in Mac OS X. I'm sure there is a
CoreAudio notification that can be registered to alert when a device is
attached.
Brian Willoughby
Sound Consulting
On Dec 19, 2007, at 04:23, Thorrin wrote:
Then have a task that polls the number of audio
devices on the system say once per second or something
like that. You can get the number of devices
connected at any time and then if that number changes,
iterate through the list of devices. If you find a
new, never before seen device then add it to the
table. If a device is removed, mark it as
disconnected in the table, but don't delete it. That
way if the user plugs the same device back in, you can
just update its plugged in status and device ID.
--- Lorenzo Thurman <email@hidden> 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.
Yes, there is. I already have a function which is installed on launch to
receive such notifications.
_______________________________________________
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