pub struct VisualAudioProcessor { /* private fields */ }Expand description
Main visual audio integration processor
Implementations§
Source§impl VisualAudioProcessor
impl VisualAudioProcessor
Sourcepub fn new(config: VisualAudioConfig) -> Self
pub fn new(config: VisualAudioConfig) -> Self
Create new visual audio processor
Sourcepub fn add_display(&mut self, display: Box<dyn VisualDisplay>) -> Result<()>
pub fn add_display(&mut self, display: Box<dyn VisualDisplay>) -> Result<()>
Add visual display
Sourcepub fn remove_display(&mut self, display_id: &str) -> Result<()>
pub fn remove_display(&mut self, display_id: &str) -> Result<()>
Remove visual display
Sourcepub fn process_audio_frame(
&mut self,
audio_samples: &[f32],
audio_channel_type: AudioChannel,
spatial_positions: &[(String, Position3D)],
listener_position: Position3D,
) -> Result<()>
pub fn process_audio_frame( &mut self, audio_samples: &[f32], audio_channel_type: AudioChannel, spatial_positions: &[(String, Position3D)], listener_position: Position3D, ) -> Result<()>
Process audio frame and generate visual effects
Sourcepub fn trigger_effect(
&mut self,
effect_id: &str,
position: Position3D,
intensity_scale: f32,
) -> Result<()>
pub fn trigger_effect( &mut self, effect_id: &str, position: Position3D, intensity_scale: f32, ) -> Result<()>
Manually trigger visual effect
Sourcepub fn clear_all_effects(&mut self) -> Result<()>
pub fn clear_all_effects(&mut self) -> Result<()>
Clear all visual effects
Sourcepub fn metrics(&self) -> &VisualAudioMetrics
pub fn metrics(&self) -> &VisualAudioMetrics
Get current metrics
Sourcepub fn update_config(&mut self, config: VisualAudioConfig)
pub fn update_config(&mut self, config: VisualAudioConfig)
Update configuration
Auto Trait Implementations§
impl Freeze for VisualAudioProcessor
impl RefUnwindSafe for VisualAudioProcessor
impl Send for VisualAudioProcessor
impl Sync for VisualAudioProcessor
impl Unpin for VisualAudioProcessor
impl UnsafeUnpin for VisualAudioProcessor
impl UnwindSafe for VisualAudioProcessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more