pub struct AudioMonitor { /* private fields */ }
Expand description
Main audio monitoring system for LED control
Implementations§
Source§impl AudioMonitor
impl AudioMonitor
Sourcepub fn new_with_device(device_name: Option<String>) -> Result<Self>
pub fn new_with_device(device_name: Option<String>) -> Result<Self>
Create a new audio monitor with a specified device name
Sourcepub fn get_config(&self) -> AudioVisualization
pub fn get_config(&self) -> AudioVisualization
Get the current visualization configuration
Sourcepub fn set_config(&self, config: AudioVisualization)
pub fn set_config(&self, config: AudioVisualization)
Update visualization configuration
Sourcepub fn set_active(&self, active: bool)
pub fn set_active(&self, active: bool)
Set whether audio monitoring should actively control the LEDs
pub async fn apply_to_device(&self, device: &mut BleLedDevice) -> Result<()>
pub async fn log_detailed_analysis(&self) -> Result<()>
pub async fn start_continuous_monitoring( &self, device: &mut BleLedDevice, ) -> Result<()>
Sourcepub fn get_energy(&self, range: FrequencyRange) -> f32
pub fn get_energy(&self, range: FrequencyRange) -> f32
Get the current energy level for a specific frequency range (0.0-1.0)
Sourcepub fn get_estimated_bpm(&self) -> f32
pub fn get_estimated_bpm(&self) -> f32
Get the estimated BPM if available (requires BpmSync mode) Returns 0.0 if BPM is not being calculated
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioMonitor
impl !RefUnwindSafe for AudioMonitor
impl !Send for AudioMonitor
impl !Sync for AudioMonitor
impl Unpin for AudioMonitor
impl !UnwindSafe for AudioMonitor
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