Re: multi-channel AUs
Re: multi-channel AUs
- Subject: Re: multi-channel AUs
- From: Bill Stewart <email@hidden>
- Date: Fri, 28 Mar 2003 19:50:50 -0800
No.
For a start all that an AU can do is accept or reject a format and this
is really decided by the context that you are run in.
For the AU the canonical (expected and most widely used) format is
NON-interleaved, Float32 for linear pcm data. That is what all of the
hosts are going to tell you that they are going to give you, so if you
want to play, you have to deal with that.
(BTW - the correct way to accept or reject formats is to use the
ValidFormat and StreamFormatWritable virtual methods from AUBase.cpp)
I'd say that you can't use the kernel approach for doing interleaved
processing, as it is going to give you by default each channel at a
single time.
So, you should look at either:
(1) Do your processing using non-interleaved
(2) Take out the kernel stuff from AUEffectBase and basically walk
through your non-interleaved data, one sample at a time for each
channel of data... ie. you can still process this across all the
channels for each sample
Really its not a question of whether the data is interleaved or not,
but whether you process channel at a time or across all channels. You
can certainly do that if you want - you just have to get each channel
from their separate buffers.
We could probably do some work to make this easier for you, but there's
been little demand for it as most people seem to prefer to do their
processing a channel at a time, so i doubt we will.
Bill
On Friday, March 28, 2003, at 05:29 PM, George Taylor wrote:
>
Hello,
>
>
I'm having trouble figuring out the right way to create an n-channel
>
cross-coupling effect that processes all input channels together in a
>
single
>
function.
>
>
I've started with the SampleEffect project, but quickly learned all
>
about
>
"V2" AUs, and that each channel is processed in its own seperate
>
Kernel. I
>
want to process multiple channels through a single Kernel. So I added
>
this
>
to my effect's constructor:
>
>
CAStreamBasicDescription old_format =
>
GetInput(0)->GetStreamFormat();
>
CAStreamBasicDescription new_format(old_format);
>
new_format.SetCanonical( 2, true );
>
GetInput(0)->SetStreamFormat( new_format );
>
GetOutput(0)->SetStreamFormat( new_format );
>
>
Is this a proper way to make the effect process interleaved data?
>
>
And I've also noticed that the AUEffectBase::MaintainKernels() method
>
is
>
where a single Kernel for each channel is created. But if the effect
>
uses an
>
interleaved format, it should only need a single Kernel for all
>
channels.
>
But MaintainKernels() isn't a virtual function, which makes me think
>
that
>
maybe I'm off on the wrong foot. Should I approach this differently?
>
Should
>
I start with AUBase and forget about AUEffectBase?
>
>
Thanks for any help with this,
>
>
George
>
_______________________________________________
>
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.