Function

AudioFileSetUserData

Sets a user data item in an audio file.

Declaration

OSStatus AudioFileSetUserData(AudioFileID inAudioFile, UInt32 inUserDataID, UInt32 inIndex, UInt32 inUserDataSize, const void *inUserData);

Parameters

inAudioFile

The audio file that you want to set a user data item in.

inUserDataID

The four-character code for the user data item.

inIndex

An index specifying the user data item you want to set. You use this parameter if the file contains more than one user data item with the four-character code specified in the inUserDataID parameter.

inUserDataSize

On input, the size of the data to copy. On output, the size of the bytes copied from the buffer.

inUserData

A pointer to a buffer from which to copy the user 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.

AudioFileGetUserData

Gets a chunk from an audio file.