Creates a format description for an audio media stream.
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
- Core Media
CFAllocatorto be used. Pass
NULLto use the default allocator.
Audio format description (see
Core). This information is required.
Audio Types .h
Size, in bytes, of audio channel layout. 0 if layout is
Audio channel layout (see CoreAudioTypes.h). Can be
Size, in bytes, of magic cookie. 0 if
Magic cookie. This information is required for some formats, and must be
NULLfor all others.
Dictionary of extension key/value pairs. Keys are always
CFStrings. Values are always property list objects (ie.
CFNumber). Can be
On output, returns the newly created audio
A result code. See “Result Codes”
ASBD is required, the channel layout is optional, and the magic cookie is required for some compression formats (and must be NULL for all others). The caller owns the returned
CMFormat, and must release it when done with it. The
ASBD, magic cookie, channel layout, and extensions are all copied (the extensions are deep-copied). The caller can deallocate them or re-use them after making this call.