Instance Method

initWithFormat:error:

Initializes a bus object with a specific format.

Declaration

- (instancetype)initWithFormat:(AVAudioFormat *)format error:(NSError * _Nullable *)outError;

Parameters

format

The initial audio format.

outError

Returns an error if the operation failed, or nil if it succeeded.

Return Value

A newly-initialized bus object, or nil if the operation failed.

Discussion

Audio units can generally be expected to support the AVAudioFormat standard format (deinterleaved 32-bit float), at any sample rate.

Channel counts can be more complex. See the channelCapabilities reference for a more complete discussion.

Initialization will fail and return an error if the specified format is unsupported for the bus.

See Also

Audio Unit Implementations

supportedChannelCounts

An array of numbers indicating the supported number of channels for this bus.

maximumChannelCount

The maximum number of channels supported for this bus.