Firelight Technologies FMOD Studio API
Studio::System::setCallback
Sets a callback to hook into various informational events.
C++ Syntax
FMOD_RESULT Studio::System::setCallback(
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask
);
C Syntax
FMOD_RESULT FMOD_Studio_System_SetCallback(
FMOD_STUDIO_SYSTEM *system,
FMOD_STUDIO_SYSTEM_CALLBACK callback,
FMOD_STUDIO_SYSTEM_CALLBACK_TYPE callbackmask
);
C# Syntax
RESULT Studio.System.setCallback(
SYSTEM_CALLBACK callback,
SYSTEM_CALLBACK_TYPE callbackmask = SYSTEM_CALLBACK_TYPE.ALL
);
JavaScript Syntax
System.setCallback(
callback,
callbackmask
);
Parameters
- callback
- Pointer to a callback to receive the callback when it happens.
- callbackmask
- A bitfield specifying which callback types are required. Masking out some callback types can help avoid a flood of irrelevant callbacks being triggered. Defaults to FMOD_STUDIO_SYSTEM_CALLBACK_ALL.
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
Some callbacks can occur asynchronously depending on Studio initialisation flags.
Example:
FMOD_RESULT F_CALLBACK MySystemCallback(FMOD_STUDIO_SYSTEM *system, FMOD_STUDIO_SYSTEM_CALLBACK_TYPE type, void *commanddata, void *userdata);
FMOD_RESULT SetupEventCallback(Studio::System *system)
{
return system->setCallback(MySystemCallback, FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD);
}
See Also
Version 1.10.03 Built on Feb 1, 2018