Initializes a newly allocated audio format instance
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- AVFoundation
Declaration
init?(commonFormat format: AVAudio Common Format, sampleRate: Double, channels: AVAudio Channel Count, interleaved: Bool)
Parameters
format
The audio format. See
AVAudio
for values.Common Format sampleRate
The sample rate, in hertz.
channels
The channel count.
interleaved
true
if the audio format is interleaved; otherwisefalse
.
Return Value
An initialized AVAudio
instance.