pub struct EnvelopeFollower { /* private fields */ }Expand description
Reusable peak envelope follower.
Implementations§
Source§impl EnvelopeFollower
impl EnvelopeFollower
Sourcepub fn new(attack_ms: f32, release_ms: f32) -> Self
pub fn new(attack_ms: f32, release_ms: f32) -> Self
Creates an attack/release envelope follower. Invalid times fall back to 5 ms attack and 100 ms release.
Sourcepub fn prepare(&mut self, sample_rate: u32)
pub fn prepare(&mut self, sample_rate: u32)
Computes the attack and release coefficients for sample_rate. Call before Self::next.
Trait Implementations§
Source§impl Clone for EnvelopeFollower
impl Clone for EnvelopeFollower
impl Copy for EnvelopeFollower
Source§impl Debug for EnvelopeFollower
impl Debug for EnvelopeFollower
Source§impl PartialEq for EnvelopeFollower
impl PartialEq for EnvelopeFollower
impl StructuralPartialEq for EnvelopeFollower
Auto Trait Implementations§
impl Freeze for EnvelopeFollower
impl RefUnwindSafe for EnvelopeFollower
impl Send for EnvelopeFollower
impl Sync for EnvelopeFollower
impl Unpin for EnvelopeFollower
impl UnsafeUnpin for EnvelopeFollower
impl UnwindSafe for EnvelopeFollower
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