[−][src]Struct noise_gate::NoiseGate
A Noise Gate which can be used to split a stream of audio based on volume, skipping periods of silence.
Fields
open_threshold: S
The volume level at which the gate will open (begin recording).
release_time: usize
The amount of time (in samples) the gate takes to go from open to fully closed.
Methods
impl<S> NoiseGate<S>
[src]
pub const fn new(open_threshold: S, release_time: usize) -> Self
[src]
Create a new NoiseGate
.
pub fn is_open(&self) -> bool
[src]
Is the gate currently passing samples through to the Sink
?
pub fn is_closed(&self) -> bool
[src]
Is the gate currently ignoring silence?
impl<S: Sample> NoiseGate<S>
[src]
pub fn process_frames<K, F>(&mut self, frames: &[F], sink: &mut K) where
F: Frame<Sample = S>,
K: Sink<F>,
[src]
F: Frame<Sample = S>,
K: Sink<F>,
Process a batch of frames, passing spans of noise through to a sink
.
Trait Implementations
impl<S: Clone> Clone for NoiseGate<S>
[src]
impl<S: PartialEq> PartialEq<NoiseGate<S>> for NoiseGate<S>
[src]
impl<S: Debug> Debug for NoiseGate<S>
[src]
Auto Trait Implementations
impl<S> Send for NoiseGate<S> where
S: Send,
S: Send,
impl<S> Sync for NoiseGate<S> where
S: Sync,
S: Sync,
impl<S> Unpin for NoiseGate<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for NoiseGate<S> where
S: UnwindSafe,
S: UnwindSafe,
impl<S> RefUnwindSafe for NoiseGate<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,