Re: mapping a CoreAudio device to a USB device
Re: mapping a CoreAudio device to a USB device
- Subject: Re: mapping a CoreAudio device to a USB device
- From: Jeff Moore <email@hidden>
- Date: Tue, 1 Aug 2006 17:38:34 -0700
There are no APIs for doing what you want to do. The best thing to
would be something like this:
1) Starting with the device's AudioDeviceID, ask the HAL for the
device's UID (kAudioDevicePropertyDeviceUID).
2) Search the IORegistry for a service that is a subclass of
"IOAudioEngine" and has the same value for the property,
"IOAudioEngineGlobalUniqueID" as the AudioDevice has for it's UID.
3) Walk up from this service through it's parents until you find the
IOService that represents the USB device and/or the interface page
you are interested in.
On Aug 1, 2006, at 4:30 PM, Allen Brunson wrote:
I have several USB AM/FM radios all connected to a single Mac, each
listening to a different radio station. I collect the audio from
the radios through PortAudio (http://www.portaudio.com/), which
uses CoreAudio under the hood. But CoreAudio doesn't have a
complete enough API to do everything I want. Specifically, I need
to tune the radios to a particular station at program startup, by
sending bytes out the USB interface, which I use HID functions for.
I use IOIteratorNext() to get io_service_t handles for each radio.
I'm using PortAudio to return a list of PaDeviceIndexes for all the
radios, which no doubt maps to some CoreAudio thing internally.
Say I've got radios A, B, and C. They map to PortAudio handles 2,
3, and 4, and io_service_t handles 4006, 4007, and 4008 (let's
say). How can I figure out which PortAudio handle goes with which
USB handle?
If there's some CoreAudio method I could call that would uniquely
identify a particular radio as a particular USB device, I could
probably hack up the PortAudio source to figure out where I could
call that method.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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