• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AUEffectBase and Stream formats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUEffectBase and Stream formats


  • Subject: Re: AUEffectBase and Stream formats
  • From: Bill Stewart <email@hidden>
  • Date: Sat, 29 Mar 2003 16:41:58 -0800

I'd thought of doing this:

if (SupportedNumChannels() == 0) {
do the channel equiv test
// no else - presume its correct
}
Init

But, really the AUEffectBase only works with in and out streams where
the channel valence matches - and I'm not comfortable having that test
there because it presumes alot of other work has been done to the class
- at that point its not unreasonable to make you also do the work to
initialize correctly.

Otherwise, I believe the implementation is making a false promise to
you...

As for taking care of say an effect that only does 2->2 (and thus
provides the SupportedNumChannels support), that AU will also need to
make sure that AUEffectBase::ChangeStreamFormat is overwritten anyway
to validate the num channels in the proposed new stream format - that
is definitely the correct place to validate the format for this
restriction (not Initialize)

So, by the time it gets to Initialize as far as the provided
implementation is concerned, those channel valences should match...

For those effects (like AUMatrixReverb) that can do different channel
valences, we subclass AUBase currently. We've talked about making a
more serviceable subclass for these kinds of effects - but haven't done
that yet.

Bill

On Saturday, March 29, 2003, at 03:34 PM, Marc Poirier wrote:

> 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
>
>
--
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.

  • Prev by Date: Unwanted noise from Reverb of DLS offline only
  • Next by Date: Re: AU Properties and Initialization
  • Previous by thread: Re: AUEffectBase and Stream formats
  • Next by thread: Unwanted noise from Reverb of DLS offline only
  • Index(es):
    • Date
    • Thread