Firelight Technologies FMOD Studio API

System::set3DRolloffCallback

When FMOD wants to calculate 3d volume for a channel, this callback can be used to override the internal volume calculation based on distance.

C++ Syntax

FMOD_RESULT System::set3DRolloffCallback(
  FMOD_3D_ROLLOFF_CALLBACK callback
);

C Syntax

FMOD_RESULT FMOD_System_Set3DRolloffCallback(
  FMOD_SYSTEM *system,
  FMOD_3D_ROLLOFF_CALLBACK callback
);

Parameters

callback
Pointer to a C function of type FMOD_3D_ROLLOFF_CALLBACK, that is used to override the FMOD volume calculation. Default is 0 or NULL. Setting the callback to null will return 3d calculation back to FMOD.

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

This function overrides FMOD_3D_INVERSEROLLOFF, FMOD_3D_LINEARROLLOFF, FMOD_3D_LINEARSQUAREROLLOFF, FMOD_3D_CUSTOMROLLOFF. To allow FMOD to calculate the 3d volume again, use 0 or NULL as the callback.

NOTE: When using the event system, call Channel::getUserData from your FMOD_3D_ROLLOFF_CALLBACK to get the event instance handle of the event that spawned the channel in question.

See Also




Version 1.03.06 Built on Apr 17, 2014