pub unsafe extern "C-unwind" fn ExtAudioFileCreateWithURL(
in_url: &CFURL,
in_file_type: AudioFileTypeID,
in_stream_desc: NonNull<AudioStreamBasicDescription>,
in_channel_layout: *const AudioChannelLayout,
in_flags: u32,
out_ext_audio_file: NonNull<ExtAudioFileRef>,
) -> i32
AudioFile
and ExtendedAudioFile
and objc2-core-audio-types
and objc2-core-foundation
only.Expand description
Create a new audio file.
Parameter inURL
: The URL of the new audio file.
Parameter inFileType
: The type of file to create. This is a constant from AudioToolbox/AudioFile.h, e.g.
kAudioFileAIFFType. Note that this is not an HFSTypeCode.
Parameter inStreamDesc
: The format of the audio data to be written to the file.
Parameter inChannelLayout
: The channel layout of the audio data. If non-null, this must be consistent
with the number of channels specified by inStreamDesc.
Parameter inFlags
: The same flags as are used with AudioFileCreateWithURL
Can use these to control whether an existing file is overwritten (or not).
Parameter outExtAudioFile
: On exit, a newly-allocated ExtAudioFileRef.
Returns: An OSStatus error code.
Creates a new audio file.
If the file to be created is in an encoded format, it is permissible for the sample rate in inStreamDesc to be 0, since in all cases, the file’s encoding AudioConverter may produce audio at a different sample rate than the source. The file will be created with the audio format actually produced by the encoder.