EventInstanceCallback

Trait EventInstanceCallback 

Source
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<()> { ... }
}
Available on crate feature studio only.
Expand description

Trait for this particular FMOD callback.

No self parameter is passed to the callback!

Provided Methods§

Source

fn created(event: EventInstance) -> Result<()>

Called when an instance is fully created.

Source

fn destroyed(event: EventInstance) -> Result<()>

Called when an instance is just about to be destroyed.

Source

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.

Source

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.

Source

fn restarted(event: EventInstance) -> Result<()>

EventInstance::start has been called on an event which was already playing.

Source

fn stopped(event: EventInstance) -> Result<()>

The event has stopped.

Source

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.

Source

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.

Source

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.

Source

fn plugin_created( event: EventInstance, plugin_props: PluginInstanceProperties, ) -> Result<()>

Called when a DSP plug-in instance has just been created.

Source

fn plugin_destroyed( event: EventInstance, plugin_props: PluginInstanceProperties, ) -> Result<()>

Called when a DSP plug-in instance is about to be destroyed.

Source

fn timeline_marker( event: EventInstance, timeline_props: TimelineMarkerProperties, ) -> Result<()>

Called when the timeline passes a named marker.

Source

fn timeline_beat( event: EventInstance, timeline_beat: TimelineBeatProperties, ) -> Result<()>

Called when the timeline hits a beat in a tempo section.

Source

fn sound_played(event: EventInstance, sound: Sound) -> Result<()>

Called when the event plays a sound.

Source

fn sound_stopped(event: EventInstance, sound: Sound) -> Result<()>

Called when the event finishes playing a sound.

Source

fn real_to_virtual(event: EventInstance) -> Result<()>

Called when the event becomes virtual.

Source

fn virtual_to_real(event: EventInstance) -> Result<()>

Called when the event becomes real.

Source

fn start_event_command( event: EventInstance, new_event: EventInstance, ) -> Result<()>

Called when a new event is started by a start event command.

Source

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.

Implementors§