Re: How to uniquely identify audio device
Re: How to uniquely identify audio device
- Subject: Re: How to uniquely identify audio device
- From: Thorrin <email@hidden>
- Date: Wed, 19 Dec 2007 04:23:20 -0800 (PST)
Hmm, this is a bit of a hack, but may work for you.
Maybe you could implement a lookup table in your app
that holds info like: Device Name, Device ID,
Direction (in/out), Connected, etc...
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.
-T
--- 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.
>
> "My Break-Dancing days are over, but there's always
> the Funky Chicken"
> --The Full Monty
>
> Lorenzo Thurman
> email@hidden
>
>
"Everyone is allergic to giant rocks hitting them in the head!"
-Thorrin's elf chick after casting a 'meteor swarm' spell ;)
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
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