pub unsafe extern "C-unwind" fn ExtAudioFileWriteAsync(
in_ext_audio_file: ExtAudioFileRef,
in_number_frames: u32,
io_data: *const AudioBufferList,
) -> i32
ExtendedAudioFile
and objc2-core-audio-types
only.Expand description
Perform an asynchronous sequential write.
Parameter inExtAudioFile
: The extended audio file object.
Parameter inNumberFrames
: The number of frames to write.
Parameter ioData
: The buffer(s) from which audio data is written to the file.
Returns: An OSStatus error code.
Writes the provided buffer list to an internal ring buffer and notifies an internal thread to perform the write at a later time. The first time this is called, allocations may be performed. You can call this with 0 frames and null buffer in a non-time-critical context to initialize the asynchronous mechanism. Once initialized, subsequent calls are very efficient and do not take locks; thus this may be used to write to a file from a realtime thread.
The client must not mix synchronous and asynchronous writes to the same file.
Pending writes are not guaranteed to be flushed to disk until ExtAudioFileDispose is called.
N.B. Errors may occur after this call has returned. Such errors may be returned from subsequent calls to this function.