Struct synfx_dsp::CustomTrigger
source · [−]pub struct CustomTrigger { /* private fields */ }
Expand description
Trigger signal detector with custom range.
Whenever you need to detect a trigger with a custom threshold.
Implementations
sourceimpl CustomTrigger
impl CustomTrigger
pub fn set_threshold(&mut self, low_thres: f32, high_thres: f32)
sourcepub fn check_trigger(&mut self, input: f32) -> bool
pub fn check_trigger(&mut self, input: f32) -> bool
Checks the input signal for a trigger and returns true when the signal surpassed the high threshold and has not fallen below low threshold yet.
Trait Implementations
sourceimpl Clone for CustomTrigger
impl Clone for CustomTrigger
sourcefn clone(&self) -> CustomTrigger
fn clone(&self) -> CustomTrigger
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CustomTrigger
impl Debug for CustomTrigger
impl Copy for CustomTrigger
Auto Trait Implementations
impl RefUnwindSafe for CustomTrigger
impl Send for CustomTrigger
impl Sync for CustomTrigger
impl Unpin for CustomTrigger
impl UnwindSafe for CustomTrigger
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more