[][src]Struct resid::wave::WaveformGenerator

pub struct WaveformGenerator {
    pub acc: u32,
    pub shift: u32,
    // some fields omitted
}

A 24 bit accumulator is the basis for waveform generation. FREQ is added to the lower 16 bits of the accumulator each cycle. The accumulator is set to zero when TEST is set, and starts counting when TEST is cleared. The noise waveform is taken from intermediate bits of a 23 bit shift register. This register is clocked by bit 19 of the accumulator.

Fields

acc: u32shift: u32

Methods

impl WaveformGenerator[src]

pub fn new(chip_model: ChipModel) -> Self[src]

pub fn get_acc(&self) -> u32[src]

pub fn get_control(&self) -> u8[src]

pub fn get_frequency(&self) -> u16[src]

pub fn get_frequency_hi(&self) -> u8[src]

pub fn get_frequency_lo(&self) -> u8[src]

pub fn get_pulse_width_hi(&self) -> u8[src]

pub fn get_pulse_width_lo(&self) -> u8[src]

pub fn get_shift(&self) -> u32[src]

pub fn get_sync_dest_sync(&self) -> bool[src]

pub fn get_sync_source_acc(&self) -> u32[src]

pub fn is_msb_rising(&self) -> bool[src]

pub fn set_acc(&mut self, value: u32)[src]

pub fn set_control(&mut self, value: u8)[src]

pub fn set_frequency_hi(&mut self, value: u8)[src]

pub fn set_frequency_lo(&mut self, value: u8)[src]

pub fn set_pulse_width_hi(&mut self, value: u8)[src]

pub fn set_pulse_width_lo(&mut self, value: u8)[src]

pub fn set_sync_dest(&mut self, dest: Rc<RefCell<WaveformGenerator>>)[src]

pub fn set_sync_source(&mut self, source: Rc<RefCell<WaveformGenerator>>)[src]

pub fn clock(&mut self)[src]

pub fn clock_delta(&mut self, delta: u32)[src]

pub fn output(&self) -> u16[src]

12-bit waveform output

pub fn read_osc(&self) -> u8[src]

pub fn reset(&mut self)[src]

pub fn synchronize(&mut self)[src]

Synchronize oscillators. This must be done after all the oscillators have been clock()'ed since the oscillators operate in parallel. Note that the oscillators must be clocked exactly on the cycle when the MSB is set high for hard sync to operate correctly. See SID::clock().

Auto Trait Implementations

Blanket Implementations

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

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

type Error = !

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<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]