Re: Questions about AUHAL device stream format
Re: Questions about AUHAL device stream format
- Subject: Re: Questions about AUHAL device stream format
- From: Brad Ford <email@hidden>
- Date: Fri, 28 Jul 2006 10:28:47 -0700
On Jul 28, 2006, at 7:21 AM, philippe wicker wrote:
Hi,
I'm a little bit confused about stream format when using a AUHAL.
When getting the device format () using AudioUnitGetProperty
passing input scope and elem 1 (current device being the default
one, in that case the built-in), the stream description reports an
interleaved packed big endian float though the device reports
16bits in AMS. Shouldn't we obtain 16 bits lpcm? How can we get the
hardware format using AUHAL?
AUHAL gets buffers of audio from the HAL in Float32, because that's
what the contract is between the HAL and the device (when doing
PCM). From AudioHardware.h:
AudioDevices contain instances of the AudioStream class. An
AudioStream represents a single
buffer of data for transferring across the user/kernel boundary.
As such, AudioStreams are the
gatekeepers of format information. Each has it's own format and
list of available formats.
AudioStreams can provide data in any format, including encoded
formats and non-audio formats. If
the format is a linear PCM format, the data will always be
presented as 32 bit, native endian
floating point. All conversions to and from the true physical
format of the hardware is handled
by the device's driver.
To find out the physical format of the hardware, you need to dip down
to the HAL layer, and query the streams on the device for their
kAudioStreamPropertyPhysicalFormat.
-Brad Ford
QuickTime Engineering
Thanks
Philippe Wicker
_______________________________________________
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
_______________________________________________
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