Function

AudioFileCreate

Declaration

OSStatus AudioFileCreate(const struct FSRef *inParentRef, CFStringRef inFileName, AudioFileTypeID inFileType, const AudioStreamBasicDescription *inFormat, AudioFileFlags inFlags, struct FSRef *outNewFileRef, AudioFileID  _Nullable *outAudioFile);

Parameters

inParentRef

A pointer to the directory where the new file should be created.

inFileName

The name of the file to be created.

inFileType

The type of audio file to create. See AudioFileTypeID for constants that can be used.

inFormat

A pointer to the structure that describes the format of the data.

inFlags

Relevant flags for creating or opening the file. Currently set to 0.

outNewFileRef

On output, a pointer to the location of the newly created file.

outAudioFile

On output, a pointer to the newly created audio file.

Return Value

A result code. See Result Codes.

Discussion

This deprecated function uses an FSRef type rather than the CFURLRef type used by the AudioFileCreateWithURL function.

See Also

Deprecated Functions