pub struct NesChip { /* private fields */ }Expand description
Pure NES 2A03 APU chip emulation logic.
No graph node, no lofi processing. Directly testable. Registers are memory-mapped at $4000–$4015 (22 bytes).
Implementations§
Source§impl NesChip
impl NesChip
Sourcepub fn write_registers(&mut self, regs: &[u8])
pub fn write_registers(&mut self, regs: &[u8])
Write register data. regs must be 22 bytes ($4000–$4015).
Sourcepub fn generate_sample(&mut self, sample_rate: f32) -> f32
pub fn generate_sample(&mut self, sample_rate: f32) -> f32
Generate one audio sample. sample_rate is the output sample rate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NesChip
impl RefUnwindSafe for NesChip
impl Send for NesChip
impl Sync for NesChip
impl Unpin for NesChip
impl UnsafeUnpin for NesChip
impl UnwindSafe for NesChip
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