[][src]Struct gba_hal::data::DutyLenEnvelope

#[repr(transparent)]
pub struct DutyLenEnvelope(_);

Combines the main pulse voice effects into a single setting.

  • 0-5 (wo): Sound length, (64-n)/256 seconds
  • 6-7: Pulse Duty
  • 8-10: Time per envelope step: x/64 sec, or 0 for no envelope.
  • 11: If the envelope is increasing or decreasing.
  • 12-15: Initial envelope volume (0 = no sound)

Methods

impl DutyLenEnvelope[src]

pub const fn new() -> Self[src]

A const "zero value" constructor

impl DutyLenEnvelope[src]

pub const LENGTH_MASK: u16[src]

pub const fn length(self) -> u16[src]

pub const fn with_length(self, length: u16) -> Self[src]

pub const DUTY_MASK: u16[src]

pub fn duty(self) -> PulseDutyPattern[src]

pub const fn with_duty(self, duty: PulseDutyPattern) -> Self[src]

pub const ENVELOPE_TIME_MASK: u16[src]

pub const fn envelope_time(self) -> u16[src]

pub const fn with_envelope_time(self, envelope_time: u16) -> Self[src]

pub const ENVELOPE_INCREASING_BIT: u16[src]

pub const fn envelope_increasing(self) -> bool[src]

pub const fn with_envelope_increasing(self, bit: bool) -> Self[src]

pub const INITIAL_VOLUME_MASK: u16[src]

pub const fn initial_volume(self) -> u16[src]

pub const fn with_initial_volume(self, initial_volume: u16) -> Self[src]

Trait Implementations

impl PartialEq<DutyLenEnvelope> for DutyLenEnvelope[src]

impl Eq for DutyLenEnvelope[src]

impl Debug for DutyLenEnvelope[src]

impl Copy for DutyLenEnvelope[src]

impl Clone for DutyLenEnvelope[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for DutyLenEnvelope[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]