Re: AUEffectBase and Stream formats
Re: AUEffectBase and Stream formats
- Subject: Re: AUEffectBase and Stream formats
- From: Marc Poirier <email@hidden>
- Date: Sun, 30 Mar 2003 00:34:53 +0100 (CET)
This all sounds to me like good changes, but I have one concern:
>
Secondly, I'd like to tighten up the enforcement of the assumption that
>
an Effect that doesn't publish a custom set of channel valences on in
>
and output, will ONLY accept matching input and output channel numbers.
>
>
So, here's the changes. I've tested these with our AUs in both Logic
>
and Spark and don't see any problems.. I'd like to see some more
>
testing (which I'll try myself... but confirmation would be nice:)...
>
>
ComponentResult AUEffectBase::Initialize()
>
{
>
// This base class only supports effects that have the same number of
>
// channels in and out - so we check here that this is the case
>
if ((GetNumberOfChannels() !=
>
GetInput(0)->GetStreamFormat().mChannelsPerFrame) ||
>
(GetNumberOfChannels() == 0))
>
{
>
return kAudioUnitErr_FormatNotSupported;
>
}
>
>
MaintainKernels();
>
return noErr;
>
}
Why does the base class only support n-to-n configurations? It seems to
me a bit redundant that an AU that inherits from AUEffectBase and which
supports non-n-to-n configs (and doesn't use kernels) will need to both
override Initialize and do format negotiation there, and also override
SupportedNumChannels and specify its allowable i/o configs. I would
personally prefer that AUEffectBase::Initialize call SupportedNumChannels
and include that info as a basis for its format negotiation (if a
non-zero value is returned).
Marc
_______________________________________________
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.