<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioFormat/init(commonFormat:sampleRate:interleaved:channelLayout:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioFormat(im)initWithCommonFormat:sampleRate:interleaved:channelLayout:"
  },
  "title" : "init(commonFormat:sampleRate:interleaved:channelLayout:)"
}
-->

# init(commonFormat:sampleRate:interleaved:channelLayout:)

Creates an audio format instance with the specified audio format, sample rate, interleaved state, and channel layout.

```
init(commonFormat format: AVAudioCommonFormat, sampleRate: Double, interleaved: Bool, channelLayout layout: AVAudioChannelLayout)
```

## Parameters

`format`

The audio format.

`sampleRate`

The sampling rate, in hertz.

`interleaved`

The Boolean value that indicates whether `format` is in an interleaved state.

`layout`

The channel layout, which must not be `nil`.

## Return Value

A new `AVAudioFormat` instance.

## Discussion

For information about possible `format` values, see [`AVAudioCommonFormat`](/documentation/AVFAudio/AVAudioCommonFormat).

## See Also

[`sampleRate`](/documentation/AVFAudio/AVAudioFormat/sampleRate)

The audio format sampling rate, in hertz.

[`isInterleaved`](/documentation/AVFAudio/AVAudioFormat/isInterleaved)

A Boolean value that indicates whether the samples mix into one stream.

[`commonFormat`](/documentation/AVFAudio/AVAudioFormat/commonFormat)

The common format identifier instance.

[`channelLayout`](/documentation/AVFAudio/AVAudioFormat/channelLayout)

The underlying audio channel layout.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)