CMAudioFormatDescriptionEqual(_:otherFormatDescription:equalityMask:equalityMaskOut:)
Returns a Boolean value that indicates whether the two audio format descriptions are equal.
Declaration
func CMAudioFormatDescriptionEqual(_ formatDescription: CMAudioFormatDescription, otherFormatDescription: CMAudioFormatDescription, equalityMask: CMAudioFormatDescriptionMask, equalityMaskOut: UnsafeMutablePointer<CMAudioFormatDescriptionMask>?) -> BoolParameters
- formatDescription:
The
CMAudioFormatDescriptionbeing compared. - otherFormatDescription:
The
CMAudioFormatDescriptionto 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 in equalityMask, and nil for equalityMaskOut, this function is equivalent to CFEqual(formatDescription, otherFormatDescription).
See Also
Working with Audio Descriptions
CMSoundDescriptionFlavorCMAudioFormatDescriptionCreateSummary(allocator:formatDescriptionArray:flags:formatDescriptionOut:)CMAudioFormatDescriptionCreate(allocator:asbd:layoutSize:layout:magicCookieSize:magicCookie:extensions:formatDescriptionOut:)CMAudioFormatDescriptionGetChannelLayout(_:sizeOut:)CMAudioFormatDescriptionGetFormatList(_:sizeOut:)CMAudioFormatDescriptionGetMagicCookie(_:sizeOut:)CMAudioFormatDescriptionGetMostCompatibleFormat(_:)CMAudioFormatDescriptionGetRichestDecodableFormat(_:)CMAudioFormatDescriptionGetStreamBasicDescription(_:)CMDoesBigEndianSoundDescriptionRequireLegacyCBRSampleTableLayout(_:flavor:)CMSwapBigEndianSoundDescriptionToHost(_:_:)CMSwapHostEndianSoundDescriptionToBig(_:_:)CMAudioFormatDescriptionCreateFromBigEndianSoundDescriptionData(allocator:bigEndianSoundDescriptionData:size:flavor:formatDescriptionOut:)CMAudioFormatDescriptionCreateFromBigEndianSoundDescriptionBlockBuffer(allocator:bigEndianSoundDescriptionBlockBuffer:flavor:formatDescriptionOut:)CMAudioFormatDescriptionCopyAsBigEndianSoundDescriptionBlockBuffer(allocator:audioFormatDescription:flavor:blockBufferOut:)