Type Alias

AUInputSamplesInOutputCallback

Called by the system when an audio unit has provided a buffer of output samples.

Declaration

typedef void (*AUInputSamplesInOutputCallback)(void *inRefCon, const AudioTimeStamp *inOutputTimeStamp, Float64 inInputSample, Float64 inNumberInputSamples);

Parameters

inRefCon

Custom data that you provided when registering your callback with the audio unit.

inOutputTimeStamp

The time stamp that corresponds to the first sample of audio data produced in AudioUnitRender (its output data).

inInputSample

The sample number of the input that is represented in the first sample of that output time stamp.

inNumberInputSamples

The number of input samples that are represented in an output buffer.

Return Value

A result code.

Discussion

If you named your callback function MyAUInputSamplesInOutputCallback, you would declare it like this:

Discussion

When your application uses a varispeed or pitch-shifting audio unit, it may not be clear which input samples are represented in a buffer of output samples. This callback function addresses this issue by providing the input sample number corresponding to the first sample in an output buffer.

See Also

Callbacks

AURenderCallback

Called by the system when an audio unit requires input samples, or before and after a render operation.

AudioUnitPropertyListenerProc

Called by the system when the value of a specified audio unit property has changed.