Function AudioFileOpenWithCallbacks

Source
pub unsafe extern "C-unwind" fn AudioFileOpenWithCallbacks(
    in_client_data: NonNull<c_void>,
    in_read_func: AudioFile_ReadProc,
    in_write_func: AudioFile_WriteProc,
    in_get_size_func: AudioFile_GetSizeProc,
    in_set_size_func: AudioFile_SetSizeProc,
    in_file_type_hint: AudioFileTypeID,
    out_audio_file: NonNull<AudioFileID>,
) -> i32
Available on crate feature AudioFile only.
Expand description

Open an existing file. You provide callbacks that the AudioFile API will use to get the data.

Parameter inClientData: a constant that will be passed to your callbacks.

Parameter inReadFunc: a function that will be called when AudioFile needs to read data.

Parameter inWriteFunc: a function that will be called when AudioFile needs to write data.

Parameter inGetSizeFunc: a function that will be called when AudioFile needs to know the total file size.

Parameter inSetSizeFunc: a function that will be called when AudioFile needs to set the file size.

Parameter inFileTypeHint: For files which have no filename extension and whose type cannot be easily or uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater. For OS versions prior to that, opening files of the above description will fail.

Parameter outAudioFile: upon success, an AudioFileID that can be used for subsequent AudioFile calls.

Returns: returns noErr if successful.