Trait aym::AymBackend [−][src]
pub trait AymBackend: Sized { type SoundSample: AySample + Debug; fn new(
chip: SoundChip,
mode: AyMode,
frequency: usize,
sample_rate: usize
) -> Self; fn write_register(&mut self, address: u8, value: u8); fn next_sample(&mut self) -> StereoSample<Self::SoundSample>; }
Expand description
Sound library generation backend.
Currently is only one backend - AymPrecise,
Associated Types
type SoundSample: AySample + Debug
[src]
Expand description
Resulting sample type
Required methods
fn new(
chip: SoundChip,
mode: AyMode,
frequency: usize,
sample_rate: usize
) -> Self
[src]
chip: SoundChip,
mode: AyMode,
frequency: usize,
sample_rate: usize
) -> Self
Expand description
Creates new aym instance.
frequency
- frequency of the sound chip in Hz
sample_rate
- target device sound sample rate
fn write_register(&mut self, address: u8, value: u8)
[src]
Expand description
Write value to the sound chip register. address
should be in [0..AY_REGISTER_COUNT]
fn next_sample(&mut self) -> StereoSample<Self::SoundSample>
[src]
Expand description
Generates next sound sample
Implementors
impl AymBackend for AymPrecise
[src]
impl AymBackend for AymPrecise
[src]type SoundSample = f64
fn new(
chip: SoundChip,
mode: AyMode,
frequency: usize,
sample_rate: usize
) -> Self
[src]
chip: SoundChip,
mode: AyMode,
frequency: usize,
sample_rate: usize
) -> Self