carb::audio::UserData

Defined in carb/audio/AudioTypes.h

struct UserData

an opaque user data object that can be attached to some objects (ie: sound data objects, sound groups, etc).

Public Members

void *data = nullptr

the opaque user data pointer associated with this entry.

The caller is responsible for creating this object and ensuring its contents are valid.

UserDataDestructor destructor = nullptr

the optional destructor that will be used to clean up the user data object whenever it is replaced or the object containing this user data object is destroyed.

This may be nullptr if no clean up is needed for the user data object. It is the host app’s responsibility to ensure that either this destructor is provided or that the user data object is manually cleaned up before anything it is attached to is destroyed.