How to determine which input bus is active when AUEffectBase :: Render is called?

This is clearly a n00b issue, as it has been successfully implemented in applications. But this is 2009, and I still do not understand how the input / output buses work with AUBase.

I will state the wording of my question from the message to the coreaudio-api mailing list . This question appears at another time unanswered through 2005.

I searched the code again AUBase, and it’s hard for me to understand how it AUBase::Render()should work in the case of several buses (because it does not accept the bus number argument) ..

Here is a brief overview of the method call order:

  • In the implementation, the AUBase::DoRender()local variable is outputset to GetOutput(inBusNumber).

  • Then the variable outputis ultimately (after calling the pre-rendering notification removal) passed to AUBase::DoRenderBus().

  • DoRenderBus()some buffer preparation is done on theOutput, which passes output(for a given bus number) and then calls RenderBus(). The output element is not passed along.

  • The standard implementation RenderBus()calls NeedsToRender()and then on 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 several output buses completely independently - you just want to call Renderwithout checking NeedsToRender. Otherwise, override Render().

, , Render(), .

... Render(), , ? RenderBus(), inBusNumber - Render(), .

+3
1

, Render .

virtual OSStatus Render(AudioUnitRenderActionFlags & ioActionFlags,
                        const AudioTimeStamp & inTimeStamp,
                        UInt32 inNumberFrames);

, , . .

, // ( , ), HasInput.

.

0

Source: https://habr.com/ru/post/1723054/


All Articles