AudioInstance

Trait AudioInstance 

Source
pub trait AudioInstance {
    // Required methods
    fn new() -> Self;
    fn update(
        &mut self,
        frame_info: &AudioRenderInfo,
        object_to_world: Mat4,
        static_data: &[u8],
        dynamic_data: &[u8],
        stereo_buffer: &mut [f32],
    );
}
Expand description

Audio module creation & update trait

Required Methods§

Source

fn new() -> Self

Creation of a new module

This is called once on startup of the module

Source

fn update( &mut self, frame_info: &AudioRenderInfo, object_to_world: Mat4, static_data: &[u8], dynamic_data: &[u8], stereo_buffer: &mut [f32], )

Implement the update of the audio module here

TODO: Describe more in detail how it works and what the parameters are

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§