pub struct Envelope {
pub start: bool,
pub loop_flag: bool,
pub constant: bool,
pub volume_or_period: u8,
pub divider: u8,
pub decay: u8,
}Expand description
Envelope generator.
Fields§
§start: boolRestart flag — set by length-load writes; consumed at next quarter clock.
loop_flag: boolLoop flag (a.k.a. length-counter halt, depending on the channel).
constant: boolConstant-volume bit. When set, output = volume_or_period.
volume_or_period: u8Volume (constant mode) or divider period - 1 (decay mode).
divider: u8Internal divider counter.
decay: u8Internal decay counter (4-bit, 15 -> 0).
Implementations§
Trait Implementations§
impl Copy for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin 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