SystemCallback

Trait SystemCallback 

Source
pub trait SystemCallback {
    // Provided methods
    fn preupdate(system: System, userdata: *mut c_void) -> Result<()> { ... }
    fn postupdate(system: System, userdata: *mut c_void) -> Result<()> { ... }
    fn bank_unload(
        system: System,
        bank: Bank,
        userdata: *mut c_void,
    ) -> Result<()> { ... }
    fn liveupdate_connected(system: System, userdata: *mut c_void) -> Result<()> { ... }
    fn liveupdate_disconnected(
        system: System,
        userdata: *mut c_void,
    ) -> Result<()> { ... }
}
Available on crate feature studio only.
Expand description

Trait for this particular FMOD callback.

No self parameter is passed to the callback!

Callbacks are called from the Studio Update Thread in default / async mode and the main (calling) thread in synchronous mode.

Provided Methods§

Source

fn preupdate(system: System, userdata: *mut c_void) -> Result<()>

Called at the start of the main Studio update. For async mode this will be on its own thread.

Source

fn postupdate(system: System, userdata: *mut c_void) -> Result<()>

Called at the end of the main Studio update. For async mode this will be on its own thread.

Source

fn bank_unload(system: System, bank: Bank, userdata: *mut c_void) -> Result<()>

Called directly when a bank has just been unloaded, after all resources are freed.

Source

fn liveupdate_connected(system: System, userdata: *mut c_void) -> Result<()>

Called after a live update connection has been established.

Source

fn liveupdate_disconnected(system: System, userdata: *mut c_void) -> Result<()>

Called after live update session disconnects.

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§