#[repr(C, packed(1))]pub struct Voice {
pub frequency: WO<u16>,
pub pulse_width: WO<u16>,
pub control: WO<VoiceControlFlags>,
pub attack_decay: WO<u8>,
pub sustain_release: WO<u8>,
}Expand description
Registers for a single SID voice/channel
Fields§
§frequency: WO<u16>FRELO/FRELO Frequency control (0x00-0x01)
pulse_width: WO<u16>PWLO/PWHI Pulse waveform width (0x02-0x03)
control: WO<VoiceControlFlags>VCREG Control register (0x04)
attack_decay: WO<u8>ATDCY Attack/decay cycle duration (0x05)
sustain_release: WO<u8>SUREL Sustain/Release Control (0x06)
Implementations§
Source§impl Voice
impl Voice
Sourcepub fn set_attack_decay(&self, attack_time: AttackTime, decay_time: DecayTime)
pub fn set_attack_decay(&self, attack_time: AttackTime, decay_time: DecayTime)
Sets the attack/decay cycle duration (ATDCY)
See e.g. Mapping the C64, page 162.
§Example:
(*c64::SID).channel1.set_attack_decay(AttackTime::Ms38, DecayTime::Ms240);Auto Trait Implementations§
impl !Freeze for Voice
impl !RefUnwindSafe for Voice
impl Send for Voice
impl !Sync for Voice
impl Unpin for Voice
impl UnwindSafe for Voice
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