Add an OversamplingAware smoothing style

This can be used to have an ergonomic way to do multi-rate smoothing
with variable oversampling amounts that only the `Arc<AtomicF32>` to be
updated from a parameter callback.
This commit is contained in:
Robbert van der Helm
2023-04-05 18:08:22 +02:00
parent 95d7dabcee
commit 8a7100ac3e
4 changed files with 58 additions and 35 deletions

View File

@@ -114,15 +114,15 @@ impl CrossoverParams {
// TODO: More sensible default frequencies
crossover_1_freq: FloatParam::new("Crossover 1", 200.0, crossover_range)
.with_smoother(crossover_smoothing_style)
.with_smoother(crossover_smoothing_style.clone())
.with_value_to_string(crossover_value_to_string.clone())
.with_string_to_value(crossover_string_to_value.clone()),
crossover_2_freq: FloatParam::new("Crossover 2", 1000.0, crossover_range)
.with_smoother(crossover_smoothing_style)
.with_smoother(crossover_smoothing_style.clone())
.with_value_to_string(crossover_value_to_string.clone())
.with_string_to_value(crossover_string_to_value.clone()),
crossover_3_freq: FloatParam::new("Crossover 3", 5000.0, crossover_range)
.with_smoother(crossover_smoothing_style)
.with_smoother(crossover_smoothing_style.clone())
.with_value_to_string(crossover_value_to_string.clone())
.with_string_to_value(crossover_string_to_value.clone()),
crossover_4_freq: FloatParam::new("Crossover 4", 10000.0, crossover_range)