Re: Simple HAL device question
Re: Simple HAL device question
- Subject: Re: Simple HAL device question
- From: Jeff Moore <email@hidden>
- Date: Thu, 29 Aug 2002 12:19:21 -0700
On Thursday, August 29, 2002, at 08:28 AM, Christopher Corbell wrote:
Or is there a simple way to just get an array or range of channels for
a device?
The easiest way is to use kAudioDevicePropertyStreamConfiguration. The
AudioBufferList it returns will be populated with the number of
channels per stream in the direction you have requested. Just sum the
channels in each AudioBuffer and you'll get the number of total
channels in the given direction.
kAudioDevicePropertyStreamConfiguration will return an empty
AudioBufferList (that is one with no AudioBuffers in it) if the device
doesn't have any streams in the direction you requested (recall that
devices may have input, output, or both sections).
Also be aware that you need to ask the device about the right section
with the value you pass to isInput. The channel number doesn't matter
for this property.
Calling GetDeviceProperty(kAudioDevicePropertyStreamConfiguration)
for the same set of devices returns without errors but one of the
devices returns
an AudioBufferList with 0 channels. This happens regardless of the
is-input flag with this device. Is this normal?
This seems kind of weird. All devices should have at least one stream,
be it an input our an output stream. What hardware are you working with?
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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.