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:
CMFormatDescriptionbeing 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
CMSoundDescriptionFlavorCMAudioFormatDescriptionCreateSummary(allocator:formatDescriptionArray:flags:formatDescriptionOut:)CMAudioFormatDescriptionCreate(allocator:asbd:layoutSize:layout:magicCookieSize:magicCookie:extensions:formatDescriptionOut:)CMAudioFormatDescriptionEqual(_:otherFormatDescription:equalityMask:equalityMaskOut:)CMAudioFormatDescriptionGetChannelLayout(_:sizeOut:)CMAudioFormatDescriptionGetFormatList(_:sizeOut:)CMAudioFormatDescriptionGetMostCompatibleFormat(_:)CMAudioFormatDescriptionGetRichestDecodableFormat(_:)CMAudioFormatDescriptionGetStreamBasicDescription(_:)CMDoesBigEndianSoundDescriptionRequireLegacyCBRSampleTableLayout(_:flavor:)CMSwapBigEndianSoundDescriptionToHost(_:_:)CMSwapHostEndianSoundDescriptionToBig(_:_:)CMAudioFormatDescriptionCreateFromBigEndianSoundDescriptionData(allocator:bigEndianSoundDescriptionData:size:flavor:formatDescriptionOut:)CMAudioFormatDescriptionCreateFromBigEndianSoundDescriptionBlockBuffer(allocator:bigEndianSoundDescriptionBlockBuffer:flavor:formatDescriptionOut:)CMAudioFormatDescriptionCopyAsBigEndianSoundDescriptionBlockBuffer(allocator:audioFormatDescription:flavor:blockBufferOut:)