6 Filter(float a0, float a1, float a2, float b0, float b1, float b2)
7 : a1(a1 / a0), a2(a2 / a0), b0(b0 / a0), b1(b1 / a0), b2(b2 / a0), d0(0.0f), d1(0.0f) {}
9 inline float update(float in)
11 float out = b0*in + d0;
12 d0 = b1 * in - a1 * out + d1;
13 d1 = b2 * in - a2 * out;
19 static Filter lpf(float cutoff_radians);
20 static Filter hpf(float cutoff_radians);
23 float a1, a2, b0, b1, b2;
27 #endif // !defined(_FILTER_H)