pub struct LowpassFilter<T> { /* private fields */ }
Expand description
A single-order lowpass filter with single precision that consumes and emits items one by one.
It is mandatory to operate on f32 values in range -1.0..=1.0
, which is
also the default in DSP.
§More Info
Implementations§
Source§impl LowpassFilter<f32>
impl LowpassFilter<f32>
Sourcepub fn new(sample_rate_hz: f32, cutoff_frequency_hz: f32) -> Self
pub fn new(sample_rate_hz: f32, cutoff_frequency_hz: f32) -> Self
Create a new lowpass filter.
§Arguments
sample_rate_hz
: Sample rate in Hz (e.g., 48000.0).cutoff_frequency_hz
: Cutoff frequency in Hz (e.g., 1000.0).
Source§impl LowpassFilter<f64>
impl LowpassFilter<f64>
Sourcepub fn new(sample_rate_hz: f64, cutoff_frequency_hz: f64) -> Self
pub fn new(sample_rate_hz: f64, cutoff_frequency_hz: f64) -> Self
Create a new lowpass filter.
§Arguments
sample_rate_hz
: Sample rate in Hz (e.g., 48000.0).cutoff_frequency_hz
: Cutoff frequency in Hz (e.g., 1000.0).
Trait Implementations§
Source§impl<T: Clone> Clone for LowpassFilter<T>
impl<T: Clone> Clone for LowpassFilter<T>
Source§fn clone(&self) -> LowpassFilter<T>
fn clone(&self) -> LowpassFilter<T>
Returns a duplicate 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<T> Freeze for LowpassFilter<T>where
T: Freeze,
impl<T> RefUnwindSafe for LowpassFilter<T>where
T: RefUnwindSafe,
impl<T> Send for LowpassFilter<T>where
T: Send,
impl<T> Sync for LowpassFilter<T>where
T: Sync,
impl<T> Unpin for LowpassFilter<T>where
T: Unpin,
impl<T> UnwindSafe for LowpassFilter<T>where
T: UnwindSafe,
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