Re: Identification of IOAudioDevice from HAL client app
Re: Identification of IOAudioDevice from HAL client app
- Subject: Re: Identification of IOAudioDevice from HAL client app
- From: Bill Stewart <email@hidden>
- Date: Sun, 10 Nov 2002 22:35:00 -0800
AMS uses the AudioHardware calls to get a list of the AudioDeviceID -
this is the object that you should use - there's nothing extra virtuous
about being an IOAudioDevice (in fact the reverse is the case):)
Bill
On Thursday, November 7, 2002, at 05:44 PM, Shaun Wexler wrote:
Is there a preferred or accepted method of detecting the actual
IOAudioDevice objects from user space, rather than using the returned
HAL
CoreAudioDevice (ID) objects? I ended up parsing the DeviceUID
returned by
HAL to determine devices, and retain matching dictionaries. I have
wrapped
HAL with my own classes, similar to Michael T9s framework (thanks MT
for the
nice ref materials, BTW), and use AudioChannel objects as my models
for I/O,
which keep all info necessary to maintain a persistent state, further
abstracting the hardware from the user. An AudioChannel maintains a
connection to its client(s), and represents one channel of an audio
stream.
One AudioManager object owns and maintains all Audio_xxxx objects. In
other
words, if an physical I/O device is removed (USB cable is unplugged,
etc),
I/O stops but the AudioChannels persist and their clients don9t lose
their
configuration. When the removed device (or ANY newly added compatible
device) again becomes available, it is auto-configured and resumes
operation
with no user intervention, to the point of allowing different devices
to
exchange I/O duties, or simply remembering a device between a USB/FW
port
move. My implementation works very well, but I want to ensure future
compatibility...
I guess a feature request is in order: we need a method of enumerating
actual hardware devices (ie IOAudioDevice) rather than just the
CoreAudioDevice (ie IOAudioEngine) objects returned by HAL, even if
it9s
just a CFArray of AudioDeviceID.
How is it done in Apple9s Audio MIDI Setup?
--
Shaun Wexler
http://www.macfoh.com
_______________________________________________
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.
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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.