Function ExtAudioFileRead

Source
pub unsafe extern "C-unwind" fn ExtAudioFileRead(
    in_ext_audio_file: ExtAudioFileRef,
    io_number_frames: NonNull<u32>,
    io_data: NonNull<AudioBufferList>,
) -> i32
Available on crate features ExtendedAudioFile and objc2-core-audio-types only.
Expand description

Perform a synchronous sequential read.

Parameter inExtAudioFile: The extended audio file object.

Parameter ioNumberFrames: On entry, ioNumberFrames is the number of frames to be read from the file. On exit, it is the number of frames actually read. A number of factors may cause a fewer number of frames to be read, including the supplied buffers not being large enough, and internal optimizations. If 0 frames are returned, however, this indicates that end-of-file was reached.

Parameter ioData: Buffer(s) into which the audio data is read.

Returns: An OSStatus error code.

If the file has a client data format, then the audio data from the file is translated from the file data format to the client format, via the ExtAudioFile’s internal AudioConverter.

(Note that the use of sequential reads/writes means that an ExtAudioFile must not be read on multiple threads; clients wishing to do this should use the lower-level AudioFile API set).