<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/ManagedAudioChannelLayout",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "s:9CoreAudio07ManagedB13ChannelLayoutV"
  },
  "title" : "ManagedAudioChannelLayout"
}
-->

# ManagedAudioChannelLayout

This structure is used to specify channel layouts in files and hardware.

```
struct ManagedAudioChannelLayout
```

## Topics

### Structures

[`struct ChannelDescriptions`](/documentation/CoreAudio/ManagedAudioChannelLayout/ChannelDescriptions-swift.struct)

A collection of `AudioChannelDescription`s.

### Initializers

[`init(audioChannelLayoutPointer: AudioChannelLayout.UnsafePointer, deallocator: (AudioChannelLayout.UnsafePointer) -> Void)`](/documentation/CoreAudio/ManagedAudioChannelLayout/init(audioChannelLayoutPointer:deallocator:))

Creates a new `ManagedAudioChannelLayout` from an existing pointer to an
`AudioChannelLayout`.

[`init(channelDescriptions: [AudioChannelDescription])`](/documentation/CoreAudio/ManagedAudioChannelLayout/init(channelDescriptions:))

Creates a new `ManagedAudioChannelLayout` from an array of
`AudioChannelDescription`.

[`init(maximumDescriptions: Int)`](/documentation/CoreAudio/ManagedAudioChannelLayout/init(maximumDescriptions:))

Creates a new `ManagedAudioChannelLayout` that can hold up to
`maximumDescriptions`.

[`init(tag: AudioChannelLayoutTag)`](/documentation/CoreAudio/ManagedAudioChannelLayout/init(tag:))

Creates a new `ManagedAudioChannelLayout` with a given tag.

### Instance Properties

[`var bitmap: AudioChannelBitmap`](/documentation/CoreAudio/ManagedAudioChannelLayout/bitmap)

If `tag` is set to `kAudioChannelLayoutTag_UseChannelBitmap`, this is the
channel usage bitmap.

[`var channelDescriptions: ManagedAudioChannelLayout.ChannelDescriptions`](/documentation/CoreAudio/ManagedAudioChannelLayout/channelDescriptions-swift.property)

The `AudioChannelDescription`s that describe the layout.

[`var numberOfChannels: Int`](/documentation/CoreAudio/ManagedAudioChannelLayout/numberOfChannels)

The number of channels described by this `ManagedAudioChannelLayout`.

[`var sizeInBytes: Int`](/documentation/CoreAudio/ManagedAudioChannelLayout/sizeInBytes)

The size, in bytes, of the backing `AudioChannelLayout`.

[`var tag: AudioChannelLayoutTag`](/documentation/CoreAudio/ManagedAudioChannelLayout/tag)

The `AudioChannelLayoutTag` that indicates the layout.

### Instance Methods

[`func setAllToUnknown()`](/documentation/CoreAudio/ManagedAudioChannelLayout/setAllToUnknown())

Sets all `AudioChannelDescriptions` to `kAudioChannelLabel_Unknown`.

[`func withUnsafeMutablePointer<Result>((UnsafeMutablePointer<AudioChannelLayout>) throws -> Result) rethrows -> Result`](/documentation/CoreAudio/ManagedAudioChannelLayout/withUnsafeMutablePointer(_:))

Calls a closure with a mutable pointer to the backing `AudioChannelLayout`.

[`func withUnsafePointer<Result>((UnsafePointer<AudioChannelLayout>) throws -> Result) rethrows -> Result`](/documentation/CoreAudio/ManagedAudioChannelLayout/withUnsafePointer(_:))

Calls a closure with a pointer to the backing `AudioChannelLayout`.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

---

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)