Function

AudioFileOpen

Declaration

OSStatus AudioFileOpen(const struct FSRef *inFileRef, AudioFilePermissions inPermissions, AudioFileTypeID inFileTypeHint, AudioFileID  _Nullable *outAudioFile);

Parameters

inFileRef

A pointer to the audio file you want to open.

inPermissions

The read-write permissions you want to assign to the file. Use the permission constants in AudioFilePermissions.

inFileTypeHint

A hint to indicate the file type of the designated file. For files without filename extensions and with types not easily or uniquely determined from the data (such as ADTS,AC3), use this hint to indicate the file type. Otherwise, pass 0. Only use this hint in macOS versions 10.3.1 or greater. In all earlier versions, any attempt to open these files fails.

outAudioFile

On output, a pointer to the newly opened file.

Return Value

A result code. See Result Codes.

Discussion

This deprecated function opens an existing audio file specified by a file system reference.

See Also

Deprecated Functions