#ifndef _IIRFILETER_HH_8524585704327027602 #define _IIRFILETER_HH_8524585704327027602 /// /// IIRÂ˲¨Æ÷ÀàÐÍ /// enum IIRFilterType { bessel, butterworth, linkwitz_riley, eq, }; enum IIRBANDType { lowpass, highpass, bpf_pq, //(constant skirt gain, peak gain = Q) bpf_zero, //(constant 0 dB peak gain) notch, apf, peaking_eq, lowshelf, highshelf, }; class IIRFilter { private: void call_peaking_eq_with_lowfreq(double fc, double gain, double q, int fs, double* coef_b, double* coef_a); void call_peaking_eq(double fc, double gain, double q, int fs, double* coef_b, double* coef_a); public: int eq(IIRBANDType type, int f0, double g, double q, int fs, double(*sos)[6]); int butters(IIRBANDType type, int n, int fc, int fs, double g, double (*sos)[6]); int linkwitzs(IIRBANDType type, int n, int fc, int fs, double g, double(*sos)[6]); int bessels(IIRBANDType type, int n, int fc, int fs, double g, double(*sos)[6]); }; #endif