Function

CMAudioFormatDescriptionCreateSummary(allocator:formatDescriptionArray:flags:formatDescriptionOut:)

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

Declaration

func CMAudioFormatDescriptionCreateSummary(allocator: CFAllocator?, formatDescriptionArray: CFArray, flags: UInt32, formatDescriptionOut: UnsafeMutablePointer<CMAudioFormatDescription?>) -> OSStatus

Parameters

allocator

The allocator to use. Pass kCFAllocatorDefault or NULL to use the default allocator.

formatDescriptionArray

The array of format descriptions to summarize.

flags

Pass 0.

summaryFormatDescriptionOut

On output, returns the newly created audio format description.

Discussion

The summary format description will be canonical LPCM and deep enough in sample rate, channel layout and channel count to sensibly contain the result of decoding and mixing the constituent format descriptions.

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.