void Biquad4proc::setCoefficients(double a0, double a1, double a2, double b0, double b1, double b2) { int64_t A1 = -toFixedPoint(a1/a0); int64_t A2 = -toFixedPoint(a2/a0); int64_t B0 = toFixedPoint(b0/a0); int64_t B1 = toFixedPoint(b1/a0); int64_t B2 = toFixedPoint(b2/a0); mA1 = A1; mA2 = A2; mB0 = B0; mB1 = B1; mB2 = B2; }
void Biquad::setCoefficients(int32_t steps, double a0, double a1, double a2, double b0, double b1, double b2) { int64_t A1 = -toFixedPoint(a1/a0); int64_t A2 = -toFixedPoint(a2/a0); int64_t B0 = toFixedPoint(b0/a0); int64_t B1 = toFixedPoint(b1/a0); int64_t B2 = toFixedPoint(b2/a0); if (steps == 0) { mA1 = A1; mA2 = A2; mB0 = B0; mB1 = B1; mB2 = B2; mInterpolationSteps = 0; } else { mA1dif = (A1 - mA1) / steps; mA2dif = (A2 - mA2) / steps; mB0dif = (B0 - mB0) / steps; mB1dif = (B1 - mB1) / steps; mB2dif = (B2 - mB2) / steps; mInterpolationSteps = steps; } }