Type Alias

AURenderObserver

A block called when an audio unit renders audio.

Declaration

typedef void (^AURenderObserver)(AudioUnitRenderActionFlags actionFlags, const AudioTimeStamp *timestamp, AUAudioFrameCount frameCount, NSInteger outputBusNumber);

Discussion

This block is called by the base class’s AURenderBlock block before and after each render cycle. The observer can distinguish between before and after using the kAudioUnitRenderAction_PreRender and kAudioUnitRenderAction_PostRender action flag values.

The block takes the following parameters:

actionFlags

The pointer to the action flags.

timestamp

The HAL time at which the input data will be rendered. If there is a sample rate conversion or time compression/expansion downstream, the sample time will not have a defined correlation with the AudioDevice sample time.

frameCount

The number of sample frames to render.

outputBusNumber

The index of the output bus to render.