Type Alias

AudioFile_WriteProc

A callback for writing file data when used in conjunction with the AudioFileOpenWithCallbacks or AudioFileCreateWithURL functions.

Declaration

typedef OSStatus (*AudioFile_WriteProc)(void *inClientData, SInt64 inPosition, UInt32 requestCount, const void *buffer, UInt32 *actualCount);

Parameters

inClientData

A pointer to the client data as set in the inClientData parameter to AudioFileOpenWithCallbacks orAudioFileInitializeWithCallbacks.

inPosition

An offset into the data from which to read.

requestCount

The number of bytes to write.

buffer

A pointer to the buffer containing the data to write.

actualCount

Upon completion, the callback should set this to a pointer to the number of bytes successfully written.

Return Value

A result code. See Result Codes.

Discussion

If you named your function MyAudioFile_WriteProc, you would declare it like this:

Discussion

This callback function is invoked when Audio File Services needs to write data.

See Also

Callbacks

AudioFile_ReadProc

Reads audio data when used in conjunction with the AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks functions.)

AudioFile_GetSizeProc

Gets file data size.

AudioFile_SetSizeProc

Sets file data size.