pub struct NoiseGate { /* private fields */ }
Expand description
The Noise Gate This should be implemented outside of your main audio loop so that the open/close thresholds, and other settings can persist across the stream
Implementations§
Source§impl NoiseGate
impl NoiseGate
Sourcepub fn new(
open_threshold: f32,
close_threshold: f32,
sample_rate: f32,
channels: usize,
release_rate: f32,
attack_rate: f32,
hold_time: f32,
) -> Self
pub fn new( open_threshold: f32, close_threshold: f32, sample_rate: f32, channels: usize, release_rate: f32, attack_rate: f32, hold_time: f32, ) -> Self
Create a new noise gate.
Sourcepub fn process_frame(&mut self, frame: &[f32]) -> Vec<f32>
pub fn process_frame(&mut self, frame: &[f32]) -> Vec<f32>
Takes a frame and returns a new frame that has been attenuated by the gate
Auto Trait Implementations§
impl Freeze for NoiseGate
impl RefUnwindSafe for NoiseGate
impl Send for NoiseGate
impl Sync for NoiseGate
impl Unpin for NoiseGate
impl UnwindSafe for NoiseGate
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