Re: kAudioHardwarePropertyDeviceForUID ???
Re: kAudioHardwarePropertyDeviceForUID ???
- Subject: Re: kAudioHardwarePropertyDeviceForUID ???
- From: "B.J. Buchalter" <email@hidden>
- Date: Fri, 20 Sep 2002 14:24:00 -0400
Hi Bob,
>
You are getting the expected results. Every time the device comes and goes,
>
it is going to have a different AudioDeviceID value. That's why you use the
>
UID in first place. Since it is a unique and persistent identifier across
>
processes and boots, you can always get the valid AudioDeviceID for the
>
device that you care about.
Thanks for the response, but -- these are not the expected results, or if
they are, the call is useless. I understand that the device will have a
different AudioDeviceID each time it connects to the system -- that is why I
am trying to use the GUID to get the AudioDeviceID.
I'm saying that the first time the device comes, I use the GUID to get the
AudioDeviceID and it works fine. I then unplug the device, wait, and replug
the device. I get a notification that the device has re-appeared (IOKit --
not coreaudio), and I use the GUID to lookup the AudioDeviceID a *second*
time. The second time I do it, I get back noErr as the result, but the
actual AudioDeviceID returned is not correct, and in fact does not
correspond to *any* audio device in the system. I use the
DisplayHALDeviceInfo command from the SDK to read out the AudioDeviceID's of
all the devices in the system (I run the command *after* the device has been
reconnected and recognized) and the AudioDeviceID I get back from the GUID
does not match the device's actual ID, nor does it match any device's actual
ID, nor does it match the previous ID for that device.
If I quit my app and run it again, it works the first time the device is
connected, but not subsequent times (unless I quit again).
>
note: If you are using a USB device for example, it will have a different
>
UID for each USB port in which it is connected.
The GUID for the device is world-unique and does not depend on the port that
the device is attached to. I know because I wrote the driver for the device
and I check the GUID in my debugging code in my app and it is correct and
matches the GUID of the device.
Of course, based upon what you say in your note, for USB devices the GUID
does not satisfy the properties you described in the first paragraph.....
Does this clarify what I am seeing?
Best regards,
B.J. Buchalter
Metric Halo
M/S 601 - Building 8
Castle Point Campus
Castle Point, NY 12511-0601 USA
tel +1 845 831-8600
fax +1 603 250-2451
If you haven't heard ChannelStrip yet, you don't know what you're missing!
Check out SpectraFoo, ChannelStrip and Mobile I/O at
http://www.mhlabs.com/
Download a 12 day demo from <
http://www.mhlabs.com/demo/>
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.