1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ix!();

use crate::{
    Conditioner,
    ConditionerParam,
};

impl Update for Conditioner {

    fn update(&mut self) {
        self.update_bands();
    }
}

impl Conditioner {

    pub fn update_bands(&mut self) {

        self.band1.coeff_peak_eq(
            self.band1.calc_omega(-2.5), 
            2.0, 
            self.pvalf(ConditionerParam::Bass) as f64
        );

        self.band2.coeff_peak_eq(
            self.band2.calc_omega(4.75), 
            2.0, 
            self.pvalf(ConditionerParam::Treble) as f64
        );
    }
}