pub struct Envelope { /* private fields */ }Expand description
An ADSR envelope implementation
Implementations§
Source§impl Envelope
impl Envelope
Sourcepub fn set_sample_rate(&self, sample_rate: f32)
pub fn set_sample_rate(&self, sample_rate: f32)
Set the envelope sample rate, required before playback
Sourcepub fn set_attack(&self, duration: Duration)
pub fn set_attack(&self, duration: Duration)
Set the envelope sample rate, required before playback
Sourcepub fn set_sustain(&self, sustain: f32)
pub fn set_sustain(&self, sustain: f32)
Set the envelope sustain time
Sourcepub fn set_release(&self, duration: Duration)
pub fn set_release(&self, duration: Duration)
Set the envelope release time
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnwindSafe for Envelope
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