ExtAudioFileWrapAudioFileID

Function ExtAudioFileWrapAudioFileID 

Source
pub unsafe extern "C-unwind" fn ExtAudioFileWrapAudioFileID(
    in_file_id: AudioFileID,
    in_for_writing: bool,
    out_ext_audio_file: NonNull<ExtAudioFileRef>,
) -> i32
Available on crate features AudioFile and ExtendedAudioFile only.
Expand description

Wrap an AudioFileID in an ExtAudioFileRef.

Parameter inFileID: The AudioFileID to wrap.

Parameter inForWriting: True if the AudioFileID is a new file opened for writing.

Parameter outExtAudioFile: On exit, a newly-allocated ExtAudioFileRef.

Returns: An OSStatus error code.

Allocates a new ExtAudioFileRef which wraps an existing AudioFileID. The client is responsible for keeping the AudioFileID open until the ExtAudioFileRef is disposed. Disposing the ExtAudioFileRef will not close the AudioFileID when this Wrap API call is used, so the client is also responsible for closing the AudioFileID when finished with it.

ยงSafety

  • in_file_id must be a valid pointer.
  • out_ext_audio_file must be a valid pointer.