Function

CMAudioFormatDescriptionGetFormatList(_:sizeOut:)

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

Declaration

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

Parameters

desc

CMFormatDescription being interrogated.

formatListSize

Pointer to variable that will be written with the size of the formatList.

Return Value

A read-only pointer to the array of AudioFormatListItem structs inside the audio format description.

Discussion

This property is analogous to kAudioFormatProperty_FormatList (See AudioFormat.h) and follows its conventions. Namely, formats are returned in order from the most to least “rich”, with channel count taking the highest precedence followed by sample rate. This API is specific to audio format descriptions, and will return NULL if called with a non-audio format description.

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