pub struct ToneStack { /* private fields */ }Expand description
Represents the tone stack with atomic bass, middle, and treble parameters for audio equalization.
The tone stack provides controls for adjusting low (bass), mid-range (middle), and high (treble) frequencies.
It uses [AtomicF32] for lock-free updates, enabling low-latency parameter changes from the UI thread
while the audio processing thread reads them without interruption.
All parameters are validated to be between 0.0 and 1.0 (inclusive); attempting to set a value outside this range will panic.
Implementations§
Source§impl ToneStack
impl ToneStack
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ToneStack with default parameter values.
Bass, middle, and treble are initialized to 1.0.
Sourcepub fn bass(&self) -> Arc<AtomicF32>
pub fn bass(&self) -> Arc<AtomicF32>
Returns a cloned Arc to the atomic bass value.
Allows independent threads to share and read/write the bass parameter without contention.
Sourcepub fn middle(&self) -> Arc<AtomicF32>
pub fn middle(&self) -> Arc<AtomicF32>
Returns a cloned Arc to the atomic middle value.
Allows independent threads to share and read/write the middle parameter without contention.
Sourcepub fn treble(&self) -> Arc<AtomicF32>
pub fn treble(&self) -> Arc<AtomicF32>
Returns a cloned Arc to the atomic treble value.
Allows independent threads to share and read/write the treble parameter without contention.