<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMAudioFormatDescriptionGetChannelLayout(_:sizeOut:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMAudioFormatDescriptionGetChannelLayout"
  },
  "title" : "CMAudioFormatDescriptionGetChannelLayout(_:sizeOut:)"
}
-->

# CMAudioFormatDescriptionGetChannelLayout(_:sizeOut:)

Returns a read-only pointer to, and the size of, the audio channel layout inside an audio format description.

```
func CMAudioFormatDescriptionGetChannelLayout(_ desc: CMAudioFormatDescription, sizeOut: UnsafeMutablePointer<Int>?) -> UnsafePointer<AudioChannelLayout>?
```

## Parameters

`desc`

`CMFormatDescription` being interrogated.

`sizeOut`

Pointer to variable that will be written with the size of the layout. Can be `NULL`.

## Return Value

A read-only pointer to the `AudioChannelLayout` inside the audio format description.

## Discussion

AudioChannelLayouts are optional; this API returns `NULL` if one doesn’t exist. This API is specific to audio format descriptions, and returns `NULL` if called with a non-audio format description.

---

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)