Contents

init(streamDescription:)

Creates an audio format instance from a stream description.

Declaration

init?(streamDescription asbd: UnsafePointer<AudioStreamBasicDescription>)

Parameters

  • asbd:

    The audio stream description.

Return Value

A new AVAudioFormat instance, or nil if the initialization fails.

Discussion

If the AudioStreamBasicDescription specifies more than two channels, this method fails and returns nil. Instead, use the init(streamDescription:channelLayout:) method.

See Also

Creating a New Audio Format Representation