pub struct LofiConfig {
pub system: ClassicSystem,
pub hardware: HardwareEmulation,
pub enable_bitcrush: bool,
pub enable_sr_reduction: bool,
pub enable_noise: bool,
pub output_gain: f32,
pub dc_offset: f32,
pub output_ceiling: f32,
pub dry_wet: f32,
}Expand description
Configuration for the lo-fi audio processor.
Fields§
§system: ClassicSystemTarget classic system to emulate.
hardware: HardwareEmulationHardware imperfection parameters.
enable_bitcrush: boolEnable bitcrushing effect.
enable_sr_reduction: boolEnable sample rate reduction.
enable_noise: boolEnable noise simulation.
output_gain: f32Output gain (1.0 = unity).
dc_offset: f32DC offset correction — subtracted from each sample after gain.
Use 0.5 for AY-3-8910 (which produces [0.0, 1.0] — all positive).
Default: 0.0 (no correction).
output_ceiling: f32Hard clamp ceiling applied after offset correction.
Values are clamped to [-ceiling, +ceiling]. Default: 1.0 (no clamping).
Set to 0.8 for conservative headroom into downstream processors.
dry_wet: f32Dry/wet mix (1.0 = fully wet).
Implementations§
Source§impl LofiConfig
impl LofiConfig
Sourcepub fn for_system(system: ClassicSystem) -> Self
pub fn for_system(system: ClassicSystem) -> Self
Creates a LofiConfig pre-populated for a given classic system.
Trait Implementations§
Source§impl Clone for LofiConfig
impl Clone for LofiConfig
Source§fn clone(&self) -> LofiConfig
fn clone(&self) -> LofiConfig
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 moreSource§impl Debug for LofiConfig
impl Debug for LofiConfig
Source§impl Default for LofiConfig
impl Default for LofiConfig
Source§impl<'de> Deserialize<'de> for LofiConfig
impl<'de> Deserialize<'de> for LofiConfig
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
Auto Trait Implementations§
impl Freeze for LofiConfig
impl RefUnwindSafe for LofiConfig
impl Send for LofiConfig
impl Sync for LofiConfig
impl Unpin for LofiConfig
impl UnsafeUnpin for LofiConfig
impl UnwindSafe for LofiConfig
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