CMAudioFormatDescriptionCreate

Function CMAudioFormatDescriptionCreate 

Source
pub unsafe extern "C-unwind" fn CMAudioFormatDescriptionCreate(
    allocator: Option<&CFAllocator>,
    asbd: NonNull<AudioStreamBasicDescription>,
    layout_size: usize,
    layout: *const AudioChannelLayout,
    magic_cookie_size: usize,
    magic_cookie: *const c_void,
    extensions: Option<&CFDictionary>,
    format_description_out: NonNull<*const CMAudioFormatDescription>,
) -> i32
Available on crate features CMFormatDescription and objc2-core-audio-types only.
Expand description

Creates a format description for an audio media stream.

The 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 CMFormatDescription, 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.

ยงSafety

  • asbd must be a valid pointer.
  • layout must be a valid pointer or null.
  • magic_cookie must be a valid pointer or null.
  • extensions generics must be of the correct type.
  • format_description_out must be a valid pointer.