Contents

CMAudioFormatDescriptionGetMagicCookie(_:sizeOut:)

Returns a read-only pointer to, and size of, the magic cookie in an audio format description.

Declaration

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

Parameters

  • desc:

    CMFormatDescription being interrogated.

  • sizeOut:

    Pointer to variable that will be written with the size of the cookie. Can be NULL.

Return Value

A read-only pointer to the magic cookie inside the audio format description.

Discussion

The magic cookie is a completely opaque piece of data, written and read only by the codec itself. A magic cookie is only present for codecs that require it; this API will return NULL if one does not exist. This API is specific to audio format descriptions, and will return NULL if called with a non-audio format description.

See Also

Working with Audio Descriptions