Channel::setUserData

FMOD Studio API

Firelight Technologies FMOD Studio API

Channel::setUserData

Sets a user value that can be retrieved with ChannelControl::getUserData.

C++ Syntax

FMOD_RESULT Channel::setUserData(
  void *userdata
);

C Syntax

FMOD_RESULT FMOD_Channel_SetUserData(
  FMOD_CHANNEL *channel,
  void *userdata
);

C# Syntax

RESULT Channel.setUserData(
  IntPtr userdata
);

JavaScript Syntax

Channel.setUserData(
  userdata                         
);

Parameters

userdata
Data that the user wishes stored within this object.

Return Values

If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.

Remarks

You can use this to store a pointer to any wrapper or internal class that is associated with this object. This is especially useful for callbacks where you need to get back access to your own objects.

See Also




Version 1.10.03 Built on Feb 1, 2018