Function

AudioUnitAddRenderNotify

Registers a callback to receive audio unit render notifications.

Declaration

OSStatus AudioUnitAddRenderNotify(AudioUnit inUnit, AURenderCallback inProc, void *inProcUserData);

Parameters

inUnit

The audio unit that you want to receive render notifications from.

inProc

The callback that you are registering.

inProcUserData

Custom data that you want to be sent to your callback. Use this, for example, to identify the render listener.

Return Value

A result code.

Discussion

The registered callback function is called both before the audio unit performs its render operations (when the render flag’s pre-render bit is set) and after the audio unit has completed its render operation (the render flag’s post-render bit is set).

The inProc and inProcUserData parameters are treated as a two-part identifier. To remove a render listener, you must pass both these values to the AudioUnitRemoveRenderNotify function.

See Also

Audio Unit Initialization and Rendering Audio

AudioUnitInitialize

Initializes an audio unit

AudioUnitUninitialize

Uninitializes an audio unit.

AudioUnitRemoveRenderNotify

Unregisters a previously-registered render listener callback function.

AudioUnitRender

Initiates a rendering cycle for an audio unit.

AudioUnitReset

Resets an audio unit’s render state.