<!--
{
  "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/CMAudioFormatDescriptionEqual(_:otherFormatDescription:equalityMask:equalityMaskOut:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMAudioFormatDescriptionEqual"
  },
  "title" : "CMAudioFormatDescriptionEqual(_:otherFormatDescription:equalityMask:equalityMaskOut:)"
}
-->

# CMAudioFormatDescriptionEqual(_:otherFormatDescription:equalityMask:equalityMaskOut:)

Returns a Boolean value that indicates whether the two audio format descriptions are equal.

```
func CMAudioFormatDescriptionEqual(_ formatDescription: CMAudioFormatDescription, otherFormatDescription: CMAudioFormatDescription, equalityMask: CMAudioFormatDescriptionMask, equalityMaskOut: UnsafeMutablePointer<CMAudioFormatDescriptionMask>?) -> Bool
```

## Parameters

`formatDescription`

The `CMAudioFormatDescription` being compared.

`otherFormatDescription`

The `CMAudioFormatDescription` to which it is being compared.

`equalityMask`

Mask specifying which parts of the descriptions to compare.

`equalityMaskOut`

Pointer to variable that will be written with the results that represent the parts that are equal. Can be `nil`.

## Return Value

The result of the comparison.  True if all parts in which the caller is interested are equal. False if any of the parts in which the caller is interested are not equal.

## Discussion

Bits in `equalityMask` specify the caller’s interest in the equality of various parts of the descriptions. Bits set and returned in `equalityMaskOut` represent the subset of those parts that are equal. If there is any sort of error that prevents the comparison from occurring, false will be returned, and all bits in `equalityMaskOut` will be cleared. If you pass [`kCMAudioFormatDescriptionMask_All`](/documentation/CoreMedia/kCMAudioFormatDescriptionMask_All) in equalityMask, and `nil` for `equalityMaskOut`, this function is equivalent to `CFEqual(formatDescription, otherFormatDescription)`.

---

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)