Function

AudioUnitInitialize(_:)

Initializes an audio unit

Declaration

func AudioUnitInitialize(_ inUnit: AudioUnit) -> OSStatus

Parameters

inUnit

The audio unit to initialize.

Return Value

A result code.

Discussion

On successful initialization, the audio formats for input and output are valid and the audio unit is ready to render. During initialization, an audio unit allocates memory according to the maximum number of audio frames it can produce in response to a single render call.

Usually, the state of an audio unit (such as its I/O formats and memory allocations) cannot be changed while an audio unit is initialized.