Function AudioFileOpenURL

Source
pub unsafe extern "C-unwind" fn AudioFileOpenURL(
    in_file_ref: &CFURL,
    in_permissions: AudioFilePermissions,
    in_file_type_hint: AudioFileTypeID,
    out_audio_file: NonNull<AudioFileID>,
) -> i32
Available on crate features AudioFile and objc2-core-foundation only.
Expand description

Open an existing audio file.

Open an existing audio file for reading or reading and writing.

Parameter inFileRef: the CFURLRef of an existing audio file.

Parameter inPermissions: use the permission constants

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.