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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software