pub enum ClassicSystem {
Nes,
Commodore64,
SegaGenesis,
RolandD50,
AkaiS900,
EmulatorII,
FairlightCMI,
LinnDrum,
Custom {
bit_depth: u8,
sample_rate: f32,
nonlinear: bool,
noise_floor: f32,
},
}Expand description
Classic digital audio systems that inform the lo-fi emulation parameters.
Variants§
Nes
Nintendo Entertainment System (7-bit).
Commodore64
Commodore 64 (8-bit).
SegaGenesis
Sega Genesis / Mega Drive (9-bit).
RolandD50
Roland D-50 (16-bit, 32 kHz).
AkaiS900
Akai S900 (12-bit, 40 kHz, non-linear).
EmulatorII
E-mu Emulator II (8-bit, 27.7 kHz).
FairlightCMI
Fairlight CMI (8-bit, 16 kHz).
LinnDrum
LinnDrum (8-bit).
Custom
User-defined system with custom parameters.
Implementations§
Source§impl ClassicSystem
impl ClassicSystem
Sourcepub fn get_bit_depth(&self) -> u8
pub fn get_bit_depth(&self) -> u8
Returns the bit depth for this classic system.
Sourcepub fn get_sample_rate(&self) -> f32
pub fn get_sample_rate(&self) -> f32
Returns the sample rate in Hz for this classic system.
Sourcepub fn has_nonlinear_encoding(&self) -> bool
pub fn has_nonlinear_encoding(&self) -> bool
Returns true if this system uses non-linear encoding (e.g. Akai S900).
Sourcepub fn get_noise_floor_db(&self) -> f32
pub fn get_noise_floor_db(&self) -> f32
Returns the noise floor in dB for this classic system.
Trait Implementations§
Source§impl Clone for ClassicSystem
impl Clone for ClassicSystem
Source§fn clone(&self) -> ClassicSystem
fn clone(&self) -> ClassicSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ClassicSystem
Source§impl Debug for ClassicSystem
impl Debug for ClassicSystem
Source§impl<'de> Deserialize<'de> for ClassicSystem
impl<'de> Deserialize<'de> for ClassicSystem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ClassicSystem
impl PartialEq for ClassicSystem
Source§fn eq(&self, other: &ClassicSystem) -> bool
fn eq(&self, other: &ClassicSystem) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ClassicSystem
impl Serialize for ClassicSystem
impl StructuralPartialEq for ClassicSystem
Auto Trait Implementations§
impl Freeze for ClassicSystem
impl RefUnwindSafe for ClassicSystem
impl Send for ClassicSystem
impl Sync for ClassicSystem
impl Unpin for ClassicSystem
impl UnsafeUnpin for ClassicSystem
impl UnwindSafe for ClassicSystem
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