diff options
Diffstat (limited to 'src/parsing/equalizer_apo.lalrpop')
-rw-r--r-- | src/parsing/equalizer_apo.lalrpop | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parsing/equalizer_apo.lalrpop b/src/parsing/equalizer_apo.lalrpop index b1faad9..39dda67 100644 --- a/src/parsing/equalizer_apo.lalrpop +++ b/src/parsing/equalizer_apo.lalrpop | |||
@@ -6,7 +6,7 @@ grammar; | |||
6 | 6 | ||
7 | pub Main: Filter = { | 7 | pub Main: Filter = { |
8 | <preamp: Preamp> <eq: Eq> => { | 8 | <preamp: Preamp> <eq: Eq> => { |
9 | let coefficients: Vec<_> = eq.1.iter().map(|decibel| 10f64.powf(decibel / 10f64)).collect(); | 9 | let coefficients: Vec<_> = eq.1.iter().map(|decibel| 10f64.powf(decibel / 10f64).sqrt()).collect(); |
10 | // TODO: add decibel_to_ratio conversion function | 10 | // TODO: add decibel_to_ratio conversion function |
11 | let preamp = 10f64.powf(preamp / 10f64); | 11 | let preamp = 10f64.powf(preamp / 10f64); |
12 | Filter { preamp, frequencies: eq.0, coefficients } | 12 | Filter { preamp, frequencies: eq.0, coefficients } |