Re: Multiple output bus rendering
Re: Multiple output bus rendering
- Subject: Re: Multiple output bus rendering
- From: Philippe Wicker <email@hidden>
- Date: Sat, 14 Jun 2003 17:18:51 +0200
On Saturday, June 14, 2003, at 08:04 AM, Chris Reed wrote:
I'm also interested in knowing the answer. I posted a question on that
very same topic about 2 weeks ago (subject "Input and output busses
hard coded to 0 in AUEffectBase::Render") but had no answer :-(
The number of the bus which is rendered is used "as is" until the code
falls into AUEffectBase::Render where it seems to be forced to 0.
I was just looking over the AUBase code again, and I'm having trouble
seeing how AUBase::Render() is supposed to work in the case of
multiple output busses (because it doesn't take a bus number
argument)...
Here's a quick overview of the method call order:
1. In the implementation of AUBase::DoRender(), the local variable
"output" is set to GetOutput(inBusNumber).
2. Then the "output" variable is eventually (after calling the
pre-render notify callout) passed to AUBase::DoRenderBus().
3. DoRenderBus() does some buffer preparation on "theOutput", which
is "output" passed in (for the given bus number), and then calls
RenderBus(). The output element is not passed along.
4. The default implementation of RenderBus() calls NeedsToRender()
and then onto Render(), without passing the bus number or output
element object.
The comment above AUBase::RenderBus() in AUBase.h says "Override this
method if your AU processes multiple output busses completely
independently -- you'll want to just call Render without the
NeedsToRender check. Otherwise, override Render()." To me, the comment
above sounds like it's saying that you should do your processing in
Render() _even_if_ you support multiple output busses.
So... if one does his/her processing within Render(), how is one
supposed to determine which output element to work with? If you also
override RenderBus(), you could store the inBusNumber argument
somewhere for use in Render(), but that's just ugly.
Is it simply that that comment above is wrong, and you should just do
your processing in RenderBus() if you support more than one output
bus? Or am I not seeing something obvious (it's late at night, that's
perfectly possible ;-)? Am I making this far more complex than
necessary? (again, it's late :-)
thanks
-chris
_______________________________________________
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.
Philippe Wicker
email@hidden
_______________________________________________
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.