SystemCallback

Trait SystemCallback 

Source
pub trait SystemCallback {
Show 16 methods // Provided methods fn device_list_changed(system: System, userdata: *mut c_void) -> Result<()> { ... } fn device_lost(system: System, userdata: *mut c_void) -> Result<()> { ... } fn memory_allocation_failed( system: System, file: &Utf8CStr, size: c_int, userdata: *mut c_void, ) -> Result<()> { ... } fn thread_created( system: System, handle: *mut c_void, thread_name: &Utf8CStr, userdata: *mut c_void, ) -> Result<()> { ... } fn bad_dsp_connection(system: System, userdata: *mut c_void) -> Result<()> { ... } fn premix(system: System, userdata: *mut c_void) -> Result<()> { ... } fn postmix(system: System, userdata: *mut c_void) -> Result<()> { ... } fn error( system: System, error_info: ErrorCallbackInfo<'_>, userdata: *mut c_void, ) -> Result<()> { ... } fn thread_destroyed( system: System, handle: *mut c_void, thread_name: &Utf8CStr, userdata: *mut c_void, ) -> Result<()> { ... } fn pre_update(system: System, userdata: *mut c_void) -> Result<()> { ... } fn post_update(system: System, userdata: *mut c_void) -> Result<()> { ... } fn record_list_changed(system: System, userdata: *mut c_void) -> Result<()> { ... } fn buffered_no_mix(system: System, userdata: *mut c_void) -> Result<()> { ... } fn device_reinitialize( system: System, output_type: OutputType, driver_index: c_int, userdata: *mut c_void, ) -> Result<()> { ... } fn output_underrun(system: System, userdata: *mut c_void) -> Result<()> { ... } fn record_position_changed( system: System, sound: Sound, record_position: c_int, userdata: *mut c_void, ) -> Result<()> { ... }
}
Expand description

Trait for this particular FMOD callback.

No self parameter is passed to the callback!

Provided Methods§

Source

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

Called from System::update when the enumerated list of devices has changed.

Called from the main (calling) thread when set from the Core API or Studio API in synchronous mode, and from the Studio Update Thread when in default / async mode.

Source

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

👎Deprecated

Deprecated.

Source

fn memory_allocation_failed( system: System, file: &Utf8CStr, size: c_int, userdata: *mut c_void, ) -> Result<()>

Called directly when a memory allocation fails.

Source

fn thread_created( system: System, handle: *mut c_void, thread_name: &Utf8CStr, userdata: *mut c_void, ) -> Result<()>

Called from the game thread when a thread is created.

Source

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

👎Deprecated

Deprecated.

Source

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

Called from the mixer thread before it starts the next block.

Source

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

Called from the mixer thread after it finishes a block.

Source

fn error( system: System, error_info: ErrorCallbackInfo<'_>, userdata: *mut c_void, ) -> Result<()>

Called directly when an API function returns an error, including delayed async functions.

Source

fn thread_destroyed( system: System, handle: *mut c_void, thread_name: &Utf8CStr, userdata: *mut c_void, ) -> Result<()>

Called from the game thread when a thread is destroyed.

Source

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

Called at start of System::update from the main (calling) thread when set from the Core API or Studio API in synchronous mode, and from the Studio Update Thread when in default / async mode.

Source

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

Called at end of System::update from the main (calling) thread when set from the Core API or Studio API in synchronous mode, and from the Studio Update Thread when in default / async mode.

Source

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

Called from System::update when the enumerated list of recording devices has changed. Called from the main (calling) thread when set from the Core API or Studio API in synchronous mode, and from the Studio Update Thread when in default / async mode.

Source

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

Called from the feeder thread after audio was consumed from the ring buffer, but not enough to allow another mix to run.

Source

fn device_reinitialize( system: System, output_type: OutputType, driver_index: c_int, userdata: *mut c_void, ) -> Result<()>

Called from System::update when an output device is re-initialized. Called from the main (calling) thread when set from the Core API or Studio API in synchronous mode, and from the Studio Update Thread when in default / async mode.

Source

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

Called from the mixer thread when the device output attempts to read more samples than are available in the output buffer.

Source

fn record_position_changed( system: System, sound: Sound, record_position: c_int, userdata: *mut c_void, ) -> Result<()>

Called from the mixer thread when the System record position changed.

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§