pub struct SignalMonitor {
pub start_time: Instant,
/* private fields */
}Fields§
§start_time: InstantImplementations§
Source§impl SignalMonitor
impl SignalMonitor
Sourcepub fn new(display_width: usize) -> Self
pub fn new(display_width: usize) -> Self
Creates a new SignalMonitor for visualizing audio stream properties.
§Arguments
display_width- The character width of the signal strength meter.
pub fn print_header(&self)
Sourcepub fn process_samples(&mut self, samples: &[f32])
pub fn process_samples(&mut self, samples: &[f32])
Processes a chunk of audio samples to update the signal visualization. This function no longer decodes data.
Sourcepub fn display_signal(&self, max_sample: f32)
pub fn display_signal(&self, max_sample: f32)
Renders the signal strength meter to the console.
Auto Trait Implementations§
impl Freeze for SignalMonitor
impl RefUnwindSafe for SignalMonitor
impl Send for SignalMonitor
impl Sync for SignalMonitor
impl Unpin for SignalMonitor
impl UnwindSafe for SignalMonitor
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