17 double coefficients[IIR_FILTER_STAGE_COEFFICIENTS];
18 double states[IIR_FILTER_STAGE_STATES];
21 void setCoefficients(
double* newCoefficients);
22 void setStates(
double* newStates);
24 double process(
double in){
29 void process(
double* inout,
int length){
31 double b0=coefficients[0];
32 double b1=coefficients[1];
33 double b2=coefficients[2];
34 double a1=coefficients[3];
35 double a2=coefficients[4];
36 double x1 = states[0];
38 double y1 = states[2];
39 double y2 = states[3];
40 for(
int n = 0; n < length; n++){
42 double y = x0 * b0 + x1 * b1 + x2 * b2 +