Re: Stream format
Re: Stream format
- Subject: Re: Stream format
- From: Jeff Moore <email@hidden>
- Date: Tue, 25 Mar 2003 13:50:20 -0800
On Tuesday, March 25, 2003, at 01:15 PM, Steven Spencer wrote:
Does this mean that for linear PCM, the stream format flags change the
type of
float32 presented in the IOProc ?
Of course. For one, the format flags are how you know that it is
floating point as opposed to some integer format. The endianness and
packed flags will also be set as appropriate.
I ask this because I'm writing a programme to monitor the input from
an audio device and
send it to the default output unit as follows :
input -> ring buffer -> mixer -> default output
and need to know if it is necessary to use one or more audio
converters to change the input IOProc data to a
common type before it is written to the ring buffer (so all channels
have the same data type for the mixer).
If audio converters are required, I don't think they need to do sample
rate conversion since this will be done
by the default output unit and the input streams share the same sample
rate.
Are audio converters required ?
The Output Audio Units are totally hooked in to the AudioConverter to
handle massaging the data provided via the input proc into the form the
audio device wants. Note that this doesn't supply just rate conversion.
It also includes sample format conversion and channelization as well.
Check out the sample code to see how the AudioConverter in the Output
AU is used under various circumstances. Given what you are doing, you
might want to also check out the PlayEffect sample code in particular.
On Tuesday, March 25, 2003, at 07:48PM, Jeff Moore <email@hidden>
wrote:
Everything about the ASBDs returned via
kAudioDevicePropertyStreamFormat and friends applies. You should be
paying attention to everything they say.
If you are doing output, you should probably be using the HAL output
Audio Unit. It will take care of a lot of the work that goes in to
being a client of the HAL. It also interfaces with the AudioConverter
to massage the data into the form the device wants.
On Tuesday, March 25, 2003, at 08:37 AM, Steven Spencer wrote:
In AudioHardware.h, it states that linear PCM streams are presented
as
floating point
data in the IOProc. Do the stream format flags (big endian, packed
etc.)
affect the floating point formatting in the IOProc or do these just
apply to the
stream hardware formatting ?
--
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.