[−][src]Struct resid::Sid
Methods
impl Sid
[src]
pub fn new(chip_model: ChipModel) -> Self
[src]
pub fn set_sampling_parameters(
&mut self,
method: SamplingMethod,
clock_freq: u32,
sample_freq: u32
)
[src]
&mut self,
method: SamplingMethod,
clock_freq: u32,
sample_freq: u32
)
pub fn clock(&mut self)
[src]
pub fn clock_delta(&mut self, delta: u32)
[src]
pub fn enable_external_filter(&mut self, enabled: bool)
[src]
pub fn enable_filter(&mut self, enabled: bool)
[src]
pub fn input(&mut self, sample: i32)
[src]
pub fn output(&self) -> i16
[src]
pub fn reset(&mut self)
[src]
pub fn sample(
&mut self,
delta: u32,
buffer: &mut [i16],
interleave: usize
) -> (usize, u32)
[src]
&mut self,
delta: u32,
buffer: &mut [i16],
interleave: usize
) -> (usize, u32)
SID clocking with audio sampling. Fixpoint arithmetics is used.
The example below shows how to clock the SID a specified amount of cycles while producing audio output:
ⓘThis example is not tested
let mut buffer = [0i16; 8192]; while delta > 0 { let (samples, next_delta) = self.resid.sample(delta, &mut buffer[..], 1); let mut output = self.sound_buffer.lock().unwrap(); for i in 0..samples { output.write(buffer[i]); } delta = next_delta; }
pub fn read(&self, reg: u8) -> u8
[src]
pub fn write(&mut self, reg: u8, value: u8)
[src]
pub fn read_state(&self) -> State
[src]
pub fn write_state(&mut self, state: &State)
[src]
Auto Trait Implementations
impl Unpin for Sid
impl !Send for Sid
impl !Sync for Sid
impl !UnwindSafe for Sid
impl !RefUnwindSafe for Sid
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,