Function

CMAudioFormatDescriptionEqual

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

Declaration

Boolean CMAudioFormatDescriptionEqual(CMAudioFormatDescriptionRef formatDescription, CMAudioFormatDescriptionRef otherFormatDescription, CMAudioFormatDescriptionMask equalityMask, CMAudioFormatDescriptionMask *equalityMaskOut);

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

CMAudioFormatDescriptionCreateSummary

Creates a summary audio format description from an array of audio format descriptions.

CMAudioFormatDescriptionCreate

Creates a format description for an audio media stream.

CMAudioFormatDescriptionGetChannelLayout

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

CMAudioFormatDescriptionGetFormatList

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

CMAudioFormatDescriptionGetMagicCookie

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

CMAudioFormatDescriptionGetMostCompatibleFormat

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

CMAudioFormatDescriptionGetRichestDecodableFormat

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

CMAudioFormatDescriptionGetStreamBasicDescription

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

CMDoesBigEndianSoundDescriptionRequireLegacyCBRSampleTableLayout

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

CMSwapBigEndianSoundDescriptionToHost

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

CMSwapHostEndianSoundDescriptionToBig

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

CMAudioFormatDescriptionCreateFromBigEndianSoundDescriptionData

Creates a CMAudioFormatDescription from a big-endian SoundDescription data structure.

CMAudioFormatDescriptionCreateFromBigEndianSoundDescriptionBlockBuffer

Creates a CMAudioFormatDescription from a big-endian SoundDescription data structure in a CMBlockBuffer.

CMAudioFormatDescriptionCopyAsBigEndianSoundDescriptionBlockBuffer

Copies the contents of a CMAudioFormatDescription to a CMBlockBuffer in big-endian byte ordering.