pub struct Noise {
pub region: NesRegion,
pub timer: Timer,
pub shift: u16,
pub shift_mode: ShiftMode,
pub length: LengthCounter,
pub envelope: Envelope,
pub force_silent: bool,
}Expand description
APU Noise Channel provides pseudo-random noise generation.
Fields§
§region: NesRegion§timer: Timer§shift: u16§shift_mode: ShiftMode§length: LengthCounter§envelope: Envelope§force_silent: boolImplementations§
Source§impl Noise
impl Noise
pub const fn new(region: NesRegion) -> Self
pub const fn is_muted(&self) -> bool
pub const fn silent(&self) -> bool
pub const fn set_silent(&mut self, silent: bool)
pub fn clock_quarter_frame(&mut self)
pub fn clock_half_frame(&mut self)
Sourcepub const fn write_ctrl(&mut self, val: u8)
pub const fn write_ctrl(&mut self, val: u8)
$400C Noise control
Sourcepub const fn write_timer(&mut self, val: u8)
pub const fn write_timer(&mut self, val: u8)
$400E Noise timer
Sourcepub const fn write_length(&mut self, val: u8)
pub const fn write_length(&mut self, val: u8)
$400F Length counter
pub const fn set_enabled(&mut self, enabled: bool)
pub const fn volume(&self) -> u8
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Noise
impl<'de> Deserialize<'de> for Noise
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Noise
impl RefUnwindSafe for Noise
impl Send for Noise
impl Sync for Noise
impl Unpin for Noise
impl UnwindSafe for Noise
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