pub trait EventInstanceCallback {
Show 19 methods
// Provided methods
fn created(event: EventInstance) -> Result<()> { ... }
fn destroyed(event: EventInstance) -> Result<()> { ... }
fn starting(event: EventInstance) -> Result<()> { ... }
fn started(event: EventInstance) -> Result<()> { ... }
fn restarted(event: EventInstance) -> Result<()> { ... }
fn stopped(event: EventInstance) -> Result<()> { ... }
fn start_failed(event: EventInstance) -> Result<()> { ... }
fn create_programmer_sound(
event: EventInstance,
sound_props: ProgrammerSoundProperties<'_>,
) -> Result<()> { ... }
fn destroy_programmer_sound(
event: EventInstance,
sound_props: ProgrammerSoundProperties<'_>,
) -> Result<()> { ... }
fn plugin_created(
event: EventInstance,
plugin_props: PluginInstanceProperties,
) -> Result<()> { ... }
fn plugin_destroyed(
event: EventInstance,
plugin_props: PluginInstanceProperties,
) -> Result<()> { ... }
fn timeline_marker(
event: EventInstance,
timeline_props: TimelineMarkerProperties,
) -> Result<()> { ... }
fn timeline_beat(
event: EventInstance,
timeline_beat: TimelineBeatProperties,
) -> Result<()> { ... }
fn sound_played(event: EventInstance, sound: Sound) -> Result<()> { ... }
fn sound_stopped(event: EventInstance, sound: Sound) -> Result<()> { ... }
fn real_to_virtual(event: EventInstance) -> Result<()> { ... }
fn virtual_to_real(event: EventInstance) -> Result<()> { ... }
fn start_event_command(
event: EventInstance,
new_event: EventInstance,
) -> Result<()> { ... }
fn nested_timeline_beat(
event: EventInstance,
timeline_props: TimelineNestedBeatProperties,
) -> Result<()> { ... }
}
studio
only.Expand description
Trait for this particular FMOD callback.
No self
parameter is passed to the callback!
Provided Methods§
Sourcefn created(event: EventInstance) -> Result<()>
fn created(event: EventInstance) -> Result<()>
Called when an instance is fully created.
Sourcefn destroyed(event: EventInstance) -> Result<()>
fn destroyed(event: EventInstance) -> Result<()>
Called when an instance is just about to be destroyed.
Sourcefn starting(event: EventInstance) -> Result<()>
fn starting(event: EventInstance) -> Result<()>
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.
Sourcefn started(event: EventInstance) -> Result<()>
fn started(event: EventInstance) -> Result<()>
The event has commenced playing.
Normally this callback will be issued immediately after EventInstanceCallback::starting
, but may be delayed until sample data has loaded.
Sourcefn restarted(event: EventInstance) -> Result<()>
fn restarted(event: EventInstance) -> Result<()>
EventInstance::start
has been called on an event which was already playing.
Sourcefn stopped(event: EventInstance) -> Result<()>
fn stopped(event: EventInstance) -> Result<()>
The event has stopped.
Sourcefn start_failed(event: EventInstance) -> Result<()>
fn start_failed(event: EventInstance) -> Result<()>
EventInstance::start
has been called but the polyphony settings did not allow the event to start.
In this case none of EventInstanceCallback::starting
, EventInstanceCallback::started
and EventInstanceCallback::stopped
will be called.
Sourcefn create_programmer_sound(
event: EventInstance,
sound_props: ProgrammerSoundProperties<'_>,
) -> Result<()>
fn create_programmer_sound( event: EventInstance, sound_props: ProgrammerSoundProperties<'_>, ) -> Result<()>
A programmer sound is about to play. FMOD expects the callback to provide an Sound
object for it to use.
Sourcefn destroy_programmer_sound(
event: EventInstance,
sound_props: ProgrammerSoundProperties<'_>,
) -> Result<()>
fn destroy_programmer_sound( event: EventInstance, sound_props: ProgrammerSoundProperties<'_>, ) -> Result<()>
A programmer sound has stopped playing. At this point it is safe to release the Sound
object that was used.
Sourcefn plugin_created(
event: EventInstance,
plugin_props: PluginInstanceProperties,
) -> Result<()>
fn plugin_created( event: EventInstance, plugin_props: PluginInstanceProperties, ) -> Result<()>
Called when a DSP plug-in instance has just been created.
Sourcefn plugin_destroyed(
event: EventInstance,
plugin_props: PluginInstanceProperties,
) -> Result<()>
fn plugin_destroyed( event: EventInstance, plugin_props: PluginInstanceProperties, ) -> Result<()>
Called when a DSP plug-in instance is about to be destroyed.
Sourcefn timeline_marker(
event: EventInstance,
timeline_props: TimelineMarkerProperties,
) -> Result<()>
fn timeline_marker( event: EventInstance, timeline_props: TimelineMarkerProperties, ) -> Result<()>
Called when the timeline passes a named marker.
Sourcefn timeline_beat(
event: EventInstance,
timeline_beat: TimelineBeatProperties,
) -> Result<()>
fn timeline_beat( event: EventInstance, timeline_beat: TimelineBeatProperties, ) -> Result<()>
Called when the timeline hits a beat in a tempo section.
Sourcefn sound_played(event: EventInstance, sound: Sound) -> Result<()>
fn sound_played(event: EventInstance, sound: Sound) -> Result<()>
Called when the event plays a sound.
Sourcefn sound_stopped(event: EventInstance, sound: Sound) -> Result<()>
fn sound_stopped(event: EventInstance, sound: Sound) -> Result<()>
Called when the event finishes playing a sound.
Sourcefn real_to_virtual(event: EventInstance) -> Result<()>
fn real_to_virtual(event: EventInstance) -> Result<()>
Called when the event becomes virtual.
Sourcefn virtual_to_real(event: EventInstance) -> Result<()>
fn virtual_to_real(event: EventInstance) -> Result<()>
Called when the event becomes real.
Sourcefn start_event_command(
event: EventInstance,
new_event: EventInstance,
) -> Result<()>
fn start_event_command( event: EventInstance, new_event: EventInstance, ) -> Result<()>
Called when a new event is started by a start event command.
Sourcefn nested_timeline_beat(
event: EventInstance,
timeline_props: TimelineNestedBeatProperties,
) -> Result<()>
fn nested_timeline_beat( event: EventInstance, timeline_props: TimelineNestedBeatProperties, ) -> Result<()>
Called when the timeline hits a beat in a tempo section of a nested event.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.