Re: Using converter API for a multiple streams driver
Re: Using converter API for a multiple streams driver
- Subject: Re: Using converter API for a multiple streams driver
- From: Michael Thornburgh <email@hidden>
- Date: Tue, 18 Jan 2005 10:53:46 -0800
hi Stéphane.
if you choose to go the "your own interleaving/deinterleaving routines"
route, then MTAudioBufferListCopy() from MTCoreAudio (in
MTAudioBufferListUtils.[mh]) will do exactly what you want. the
routines in that file are plain-old C, not objc, but it's ".m" for some
of the objc/Foundation types i think. if you're not using objc at all,
it'd be easy enough to change a few types and #includes to have it be
actually-plain C. :)
as long as the AudioBufferLists contain only Float32 samples,
MTAudioBufferListCopy() can copy any configuration of streams/channels
to any other configuration of streams/channels.
-mike
On Jan 18, 2005, at 10:35 AM, Doug Wyatt wrote:
Stephane,
You'll need one converter per stream, since there's no way to describe
all of the 828's (or similar device's) streams with a single
AudioStreamBasicDescription. If all of the device's streams are mono
-- there are some devices like this -- you can special-case that and
just have one converter.
Or you could write your own set of interleaving/deinterleaving
routines (it's a bit of a pain to handle arbitrary numbers of channels
efficiently but it's certainly possible). If you do this it would be
wise to analyze the generated code for stalls.
Doug
On Jan 18, 2005, at 3:23, Stéphane Letz wrote:
Hi,
I need to write code to convert data from a multiple streams driver
(like the MOTU 828mk2) to a set of non-interleaved mono channels, and
I want to use the converter API (AudioConverterNew and
AudioConverterFillComplexBuffer....) For various reasons I cannot use
the AUHAL component.
I'm a bit confused: do I need to allocate and use a converter for
*each* stream in the driver ? That is for the MOTU 828mk2 example:
Stream 1 Main OUT (2 channels) ==> Converter ==> 2 mono channels
Stream2 Analog (8 channels) ==> Converter ==> 8 mono channels
Stream3 SP-DIF (2 channels) ==> Converter ==> 2 mono channels
Stream4 Phones (2 channels) ==> Converter ==> 2 mono channels
Stream4 ADAT (8 channels) ==> Converter ==> 8 mono channels
or is it possible to use a unique converter to convert all streams at
the same time?
Thanks
Stephane Letz
_______________________________________________
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