pub struct StreamingFilter { /* private fields */ }
Expand description
Represents a convolving operation with streaming input data against the provided kernel.
Implementations§
Source§impl StreamingFilter
impl StreamingFilter
Sourcepub fn new(kernel: Vec<f64>) -> StreamingFilter
pub fn new(kernel: Vec<f64>) -> StreamingFilter
Creates a new streaming filter with the provided input kernel
Sourcepub fn add_and_convolve(&mut self, sample: f64) -> Option<f64>
pub fn add_and_convolve(&mut self, sample: f64) -> Option<f64>
Adds the sample to the internal data buffer. If there are enough samples in the buffer, the convolve operation is run, and the output returned. Otherwise returns None.
Trait Implementations§
Source§impl Clone for StreamingFilter
impl Clone for StreamingFilter
Source§fn clone(&self) -> StreamingFilter
fn clone(&self) -> StreamingFilter
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StreamingFilter
impl RefUnwindSafe for StreamingFilter
impl Send for StreamingFilter
impl Sync for StreamingFilter
impl Unpin for StreamingFilter
impl UnwindSafe for StreamingFilter
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