Skip to main content

SpatialPlugin

Trait SpatialPlugin 

Source
pub trait SpatialPlugin:
    Send
    + Sync
    + Debug {
Show 13 methods // Required methods fn name(&self) -> &str; fn version(&self) -> &str; fn description(&self) -> &str; fn author(&self) -> &str; fn capabilities(&self) -> PluginCapabilities; fn initialize<'life0, 'async_trait>( &'life0 mut self, config: PluginConfig, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn process_audio<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, audio: &'life1 [f32], listener_position: Position3D, source_position: Position3D, context: &'life2 ProcessingContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn update_parameters<'life0, 'async_trait>( &'life0 mut self, parameters: PluginParameters, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_state(&self) -> PluginState; fn cleanup<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; // Provided method fn process_binaural<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, audio: &'life1 BinauraAudio, context: &'life2 ProcessingContext, ) -> Pin<Box<dyn Future<Output = Result<BinauraAudio>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... }
}
Expand description

Plugin trait that all spatial audio plugins must implement

Required Methods§

Source

fn name(&self) -> &str

Get the plugin name

Source

fn version(&self) -> &str

Get the plugin version

Source

fn description(&self) -> &str

Get the plugin description

Source

fn author(&self) -> &str

Get the plugin author

Source

fn capabilities(&self) -> PluginCapabilities

Get the plugin capabilities

Source

fn initialize<'life0, 'async_trait>( &'life0 mut self, config: PluginConfig, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initialize the plugin

Source

fn process_audio<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, audio: &'life1 [f32], listener_position: Position3D, source_position: Position3D, context: &'life2 ProcessingContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Process audio with spatial effects

Source

fn update_parameters<'life0, 'async_trait>( &'life0 mut self, parameters: PluginParameters, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update plugin parameters

Source

fn get_state(&self) -> PluginState

Get current plugin state

Source

fn cleanup<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup plugin resources

Source

fn as_any(&self) -> &dyn Any

Cast to Any for downcasting

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Cast to mutable Any for downcasting

Provided Methods§

Source

fn process_binaural<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, audio: &'life1 BinauraAudio, context: &'life2 ProcessingContext, ) -> Pin<Box<dyn Future<Output = Result<BinauraAudio>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Process binaural audio

Implementors§