Function

AudioFileGetUserData

Gets a chunk from an audio file.

Declaration

OSStatus AudioFileGetUserData(AudioFileID inAudioFile, UInt32 inUserDataID, UInt32 inIndex, UInt32 *ioUserDataSize, void *outUserData);

Parameters

inAudioFile

The audio file whose chunk you want to get.

inUserDataID

The four-character code of the designated chunk.

inIndex

An index specifying which chunk with the four-character code specified in the inUserDataID parameter you want to query.

ioUserDataSize

On input, a pointer to the size of the buffer containing the designated chunk. On output, a pointer to the size of bytes copied to the buffer.

outUserData

A pointer to a buffer in which to copy the chunk data.

Return Value

A result code. See Result Codes.

See Also

Working with User Data

AudioFileCountUserData

Gets the number of user data items with a specified ID in a file.

AudioFileGetUserDataSize

Gets the size of a user data item in an audio file.

AudioFileRemoveUserData

Removes a user data item from an audio file.

AudioFileSetUserData

Sets a user data item in an audio file.