Function

CMAudioFormatDescriptionEqual(_:otherFormatDescription:equalityMask:equalityMaskOut:)

Evaluates equality for the specified parts of two audio format descriptions.

Declaration

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

Parameters

desc1

The CMAudioFormatDescription being compared.

desc2

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 NULL.

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 NULL for equalityMaskOut, this API is equivalent to CFEqual(desc1, desc2).

See Also

Audio-Specific Functions

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

Returns a read-only pointer to (and size of) the AudioChannelLayout inside an audio CMFormatDescription.

func CMAudioFormatDescriptionGetFormatList(CMAudioFormatDescription, sizeOut: UnsafeMutablePointer<Int>?) -> UnsafePointer<AudioFormatListItem>?

Returns a read-only pointer to (and size of) the array of AudioFormatListItem structs inside an audio CMFormatDescription.

func CMAudioFormatDescriptionGetMagicCookie(CMAudioFormatDescription, sizeOut: UnsafeMutablePointer<Int>?) -> UnsafeRawPointer?

Returns a read-only pointer to (and size of) the magic cookie inside an audio CMFormatDescription.

func CMAudioFormatDescriptionGetMostCompatibleFormat(CMAudioFormatDescription) -> UnsafePointer<AudioFormatListItem>?

Returns a read-only pointer to the appropriate AudioFormatListItem inside an audio CMFormatDescription.

func CMAudioFormatDescriptionGetRichestDecodableFormat(CMAudioFormatDescription) -> UnsafePointer<AudioFormatListItem>?

Returns a read-only pointer to the appropriate AudioFormatListItem inside an audio CMFormatDescription.

func CMAudioFormatDescriptionGetStreamBasicDescription(CMAudioFormatDescription) -> UnsafePointer<AudioStreamBasicDescription>?

Returns a read-only pointer to the AudioStreamBasicDescription inside an audio CMFormatDescription.

func CMDoesBigEndianSoundDescriptionRequireLegacyCBRSampleTableLayout(CMBlockBuffer, flavor: CMSoundDescriptionFlavor?) -> Bool

Examine a big-endian SoundDescription data structure in a CMBlockBuffer, and report whether the sample tables will need to use the legacy CBR layout.

func CMSwapBigEndianSoundDescriptionToHost(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

Converts a SoundDescription data structure from big-endian to host-endian in place.

func CMSwapHostEndianSoundDescriptionToBig(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

Converts a SoundDescription data structure from host-endian to big-endian in place.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software