Defined Types



AudioFileID


An opaque reference to an AudioFile object.

typedef struct OpaqueAudioFileID *AudioFileID; 

AudioFilePropertyID


A constant for an AudioFile property.

typedef UInt32 AudioFilePropertyID; 

AudioFile_ReadProc


A callback for reading data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.

typedef OSStatus (*AudioFile_ReadProc)( 
    void *inRefCon, 
    SInt64 inPosition, 
    ByteCount requestCount, 
    void *buffer, 
    ByteCount *actualCount); 
Parameter Descriptions
inRefCon
A pointer to the client data as set in the inRefCon parameter to AudioFileXXXWithCallbacks.
inPosition
An offset into the data from which to read.
requestCount
The number of bytes to read.
buffer
The buffer in which to put the data read.
actualCount
The callback should set this to the number of bytes successfully read.
result
The callback should return noErr on success, or an appropriate error code on failure.
Discussion

a function that will be called when AudioFile needs to read data.


AudioFile_WriteProc


A callback for writing data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.

typedef OSStatus (*AudioFile_WriteProc)( 
    void *inRefCon, 
    SInt64 inPosition, 
    ByteCount requestCount, 
    const void *buffer, 
    ByteCount *actualCount); 
Parameter Descriptions
inRefCon
A pointer to the client data as set in the inRefCon parameter to AudioFileXXXWithCallbacks.
inPosition
An offset into the data from which to read.
requestCount
The number of bytes to write.
buffer
The buffer containing the data to write.
actualCount
The callback should set this to the number of bytes successfully written.
result
The callback should return noErr on success, or an appropriate error code on failure.
Discussion

a function that will be called when AudioFile needs to write data.


AudioFile_GetSizeProc


A callback for getting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.

typedef SInt64 (*AudioFile_GetSizeProc)( 
    void *inRefCon); 
Parameter Descriptions
inRefCon
A pointer to the client data as set in the inRefCon parameter to AudioFileXXXWithCallbacks.
result
The callback should return the size of the data.
Discussion

a function that will be called when AudioFile needs to determine the size of the file data. This size is for all of the data in the file, not just the audio data.


AudioFile_SetSizeProc


A callback for setting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.

typedef OSStatus (*AudioFile_SetSizeProc)( 
    void *inRefCon, 
    SInt64 inSize); 
Parameter Descriptions
inRefCon
A pointer to the client data as set in the inRefCon parameter to AudioFileXXXWithCallbacks.
result
The callback should return the size of the data.
Discussion

a function that will be called when AudioFile needs to set the size of the file data. This size is for all of the data in the file, not just the audio data. This will only be called if the file is written to.

(Last Updated July 18, 2005)