Firelight Technologies FMOD Studio API
FMOD_STUDIO_EVENT_CALLBACK_TYPE
These callback types are used with FMOD_STUDIO_EVENT_CALLBACK.
The data passed to the event callback function in the parameters argument varies based on the callback type.
FMOD_STUDIO_EVENT_CALLBACK_STARTING is called when:
- Studio::EventInstance::start has been called on an event which was not already playing. The event will remain in this state until its sample data has been loaded. If the event could not be started due to polyphony, then FMOD_STUDIO_EVENT_CALLBACK_START_FAILED will be called instead.
FMOD_STUDIO_EVENT_CALLBACK_STARTED is called when:
- The event has commenced playing. Normally this callback will be issued immediately after FMOD_STUDIO_EVENT_CALLBACK_STARTING, but may be delayed until sample data has loaded.
FMOD_STUDIO_EVENT_CALLBACK_RESTARTED is called when:
- Studio::EventInstance::start has been called on an event which was already playing.
FMOD_STUDIO_EVENT_CALLBACK_STOPPED is called when:
- The event has stopped due to Studio::EventInstance::stop being called with FMOD_STUDIO_STOP_IMMEDIATE.
- The event has finished fading out after Studio::EventInstance::stop was called with FMOD_STUDIO_STOP_ALLOWFADEOUT.
- The event has stopped naturally by reaching the end of the timeline, and no further sounds can be triggered due to parameter changes.
FMOD_STUDIO_EVENT_CALLBACK_START_FAILED is called when:
- Studio::EventInstance::start has been called but the polyphony settings did not allow the event to start. In this case none of FMOD_STUDIO_EVENT_CALLBACK_STARTING, FMOD_STUDIO_EVENT_CALLBACK_STARTED and FMOD_STUDIO_EVENT_CALLBACK_STOPPED will not be called.
FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND is called when:
- A programmer sound is about to play. FMOD expects the callback to provide an FMOD::Sound object for it to use.
FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND is called when:
- A programmer sound has stopped playing. At this point it is safe to release the FMOD::Sound object that was used.
C/C++ Syntax
#define FMOD_STUDIO_EVENT_CALLBACK_CREATED 0x00000001
#define FMOD_STUDIO_EVENT_CALLBACK_DESTROYED 0x00000002
#define FMOD_STUDIO_EVENT_CALLBACK_STARTING 0x00000004
#define FMOD_STUDIO_EVENT_CALLBACK_STARTED 0x00000008
#define FMOD_STUDIO_EVENT_CALLBACK_RESTARTED 0x00000010
#define FMOD_STUDIO_EVENT_CALLBACK_STOPPED 0x00000020
#define FMOD_STUDIO_EVENT_CALLBACK_START_FAILED 0x00000040
#define FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND 0x00000080
#define FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND 0x00000100
#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED 0x00000200
#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED 0x00000400
#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER 0x00000800
#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT 0x00001000
#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED 0x00002000
#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED 0x00004000
#define FMOD_STUDIO_EVENT_CALLBACK_ALL 0xFFFFFFFF
JavaScript Syntax
FMOD.STUDIO_EVENT_CALLBACK_CREATED
FMOD.STUDIO_EVENT_CALLBACK_DESTROYED
FMOD.STUDIO_EVENT_CALLBACK_STARTING
FMOD.STUDIO_EVENT_CALLBACK_STARTED
FMOD.STUDIO_EVENT_CALLBACK_RESTARTED
FMOD.STUDIO_EVENT_CALLBACK_STOPPED
FMOD.STUDIO_EVENT_CALLBACK_START_FAILED
FMOD.STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
FMOD.STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
FMOD.STUDIO_EVENT_CALLBACK_PLUGIN_CREATED
FMOD.STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED
FMOD.STUDIO_EVENT_CALLBACK_TIMELINE_MARKER
FMOD.STUDIO_EVENT_CALLBACK_TIMELINE_BEAT
FMOD.STUDIO_EVENT_CALLBACK_SOUND_PLAYED
FMOD.STUDIO_EVENT_CALLBACK_SOUND_STOPPED
FMOD.STUDIO_EVENT_CALLBACK_ALL
Values
FMOD_STUDIO_EVENT_CALLBACK_CREATED
Called when an instance is fully created. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_DESTROYED
Called when an instance is just about to be destroyed. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_STARTING
Called when an instance is preparing to start. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_STARTED
Called when an instance starts playing. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_RESTARTED
Called when an instance is restarted. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_STOPPED
Called when an instance stops. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_START_FAILED
Called when an instance did not start, e.g. due to polyphony. Parameters = unused.
FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND
Called when a programmer sound needs to be created in order to play a programmer instrument. Parameters = FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND
Called when a programmer sound needs to be destroyed. Parameters = FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED
Called when a DSP plugin instance has just been created. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED
Called when a DSP plugin instance is about to be destroyed. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER
Called when the timeline passes a named marker. Parameters = FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT
Called when the timeline hits a beat in a tempo section. Parameters = FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES.
FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED
Called when the event plays a sound. Parameters = FMOD::Sound.
FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED
Called when the event finishes playing a sound. Parameters = FMOD::Sound.
FMOD_STUDIO_EVENT_CALLBACK_ALL
Pass this mask to Studio::EventDescription::setCallback or Studio::EventInstance::setCallback to receive all callback types.
See Also
Version 1.10.03 Built on Feb 1, 2018