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§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get the plugin description
Get the plugin author
Sourcefn capabilities(&self) -> PluginCapabilities
fn capabilities(&self) -> PluginCapabilities
Get the plugin capabilities
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn get_state(&self) -> PluginState
fn get_state(&self) -> PluginState
Get current plugin state
Sourcefn cleanup<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Cast to mutable Any for downcasting
Provided Methods§
Sourcefn 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,
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