FMOD_CHANNELCONTROL_CALLBACK

FMOD Studio API

Firelight Technologies FMOD Studio API

FMOD_CHANNELCONTROL_CALLBACK

Callback for channel events.

C/C++ Syntax

FMOD_RESULT F_CALLBACK FMOD_CHANNELCONTROL_CALLBACK(
  FMOD_CHANNELCONTROL *channel,
  FMOD_CHANNELCONTROL_TYPE controltype,
  FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype,
  void *commanddata1,
  void *commanddata2
);

Parameters

channel

Pointer to a channel control handle.

controltype

Subtype of the channel control handle, either a channel or a channel group.

callbacktype

The type of callback. Refer to FMOD_CHANNELCONTROL_CALLBACK_TYPE.

commanddata1

The first callback type specific data generated by the callback. See remarks for meaning.

commanddata2

The second callback type specific data generated by the callback. See remarks for meaning.

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

Casting the channel handle
The 'channel' argument can be used when calling functions that are common to Channel and Channelgroup. It can be cast to FMOD::ChannelControl* for C++. If a Channel or Channelgroup specific function is needed the 'controltype' argument can be used. The 'controltype' argument is either:

  • FMOD_CHANNELCONTROL_CHANNEL
    C++: The 'channel' argument can be cast FMOD::Channel*
    C: The 'channel' argument can be cast to FMOD_CHANNEL*
  • FMOD_CHANNELCONTROL_CHANNELGROUP
    C++: The 'channel' argument can be cast to FMOD::ChannelGroup*
    C: The 'channel' argument can be cast to FMOD_CHANNELGROUP*

'commanddata1' and 'commanddata2' meanings.
These 2 values are set by the callback depending on what is happening in the callback and the type of callback.

Note! Currently the user must call System::update for these callbacks to trigger!

See Also




Version 1.10.03 Built on Feb 1, 2018