Input and output busses hard coded to 0 in AUEffectBase::Render
Input and output busses hard coded to 0 in AUEffectBase::Render
- Subject: Input and output busses hard coded to 0 in AUEffectBase::Render
- From: Philippe Wicker <email@hidden>
- Date: Thu, 29 May 2003 15:23:46 +0200
Hi all,
I'm digging into the AU SDK code to figure exactly what happens, for an
'aufx' AU subtype, when AudioUnitRender is called by the hosting app.
As far as I have understood, the calling stack is:
-> AudioUnitRender: dispatched to
-> AUBase::DoRender
-> AUBase::DoRenderBus
-> AUBase::RenderBus
-> AUEffectBase::Render (if NeedsToRender returns
true)
For the 4 first calls, the bus number to render is passed as an in
parameter (inBusNumber) and actually used to select input or output
elements when needed.
In the method AUEffectBase::Render, the bus number to render is not
passed. Instead, AUOutputElement and AUInputElement are obtained by
calling AUBase::GetOutput(0) and AUBase::GeInput(0) respectively. Data
to render are obtained by calling AUBase::PullInput (0, ...). All these
calls are always done on bus 0.
In the SDK documentation there is some words about the "main" bus
(numbered 0) and "alternate" busses (numbered from 1). Apparently,
nothing prevents an effect AU to publish, say, 2 output busses. I
assume that in this case the host will call AudioUnitRender on bus 0
and bus 1 (am I right here?). When rendering is requested on the second
bus, the call to Render will probably be filtered out by NeedsToRender.
Does that mean that the AU should override RenderBus instead of Render?
Wouldn't it be a better solution to provide RenderMainBus (called from
RenderBus if inBusNumber is 0) and RenderAlternateBus (called from
RenderBus if inBusNumber is > 0)?
Thanks to shed some light about these points.
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.