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
);
C# Syntax
RESULT System.set3DRolloffCallback(
CB_3D_ROLLOFFCALLBACK callback
);
JavaScript Syntax
System.set3DRolloffCallback(
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.
See Also
- FMOD_3D_ROLLOFF_CALLBACK
- System::set3DListenerAttributes
- System::get3DListenerAttributes
- Channel::getUserData
Version 1.10.03 Built on Feb 1, 2018