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§
Sourcefn device_list_changed(system: System, userdata: *mut c_void) -> Result<()>
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.
Sourcefn memory_allocation_failed(
system: System,
file: &Utf8CStr,
size: c_int,
userdata: *mut c_void,
) -> Result<()>
fn memory_allocation_failed( system: System, file: &Utf8CStr, size: c_int, userdata: *mut c_void, ) -> Result<()>
Called directly when a memory allocation fails.
Sourcefn thread_created(
system: System,
handle: *mut c_void,
thread_name: &Utf8CStr,
userdata: *mut c_void,
) -> Result<()>
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.
Sourcefn bad_dsp_connection(system: System, userdata: *mut c_void) -> Result<()>
👎Deprecated
fn bad_dsp_connection(system: System, userdata: *mut c_void) -> Result<()>
Deprecated.
Sourcefn premix(system: System, userdata: *mut c_void) -> Result<()>
fn premix(system: System, userdata: *mut c_void) -> Result<()>
Called from the mixer thread before it starts the next block.
Sourcefn postmix(system: System, userdata: *mut c_void) -> Result<()>
fn postmix(system: System, userdata: *mut c_void) -> Result<()>
Called from the mixer thread after it finishes a block.
Sourcefn error(
system: System,
error_info: ErrorCallbackInfo<'_>,
userdata: *mut c_void,
) -> Result<()>
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.
Sourcefn thread_destroyed(
system: System,
handle: *mut c_void,
thread_name: &Utf8CStr,
userdata: *mut c_void,
) -> Result<()>
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.
Sourcefn pre_update(system: System, userdata: *mut c_void) -> Result<()>
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.
Sourcefn post_update(system: System, userdata: *mut c_void) -> Result<()>
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.
Sourcefn record_list_changed(system: System, userdata: *mut c_void) -> Result<()>
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.
Sourcefn buffered_no_mix(system: System, userdata: *mut c_void) -> Result<()>
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.
Sourcefn device_reinitialize(
system: System,
output_type: OutputType,
driver_index: c_int,
userdata: *mut c_void,
) -> Result<()>
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.
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.