#ifndef LEANSDR_FILTERGEN_H #define LEANSDR_FILTERGEN_H #include namespace leansdr { namespace filtergen { template void normalize_power(int n, T *coeffs, float gain=1) { float s2 = 0; for ( int i=0; i void normalize_dcgain(int n, T *coeffs, float gain=1) { float s = 0; for ( int i=0; i int lowpass(int order, float Fcut, T **coeffs, float gain=1) { int ncoeffs = order + 1; *coeffs = new T[ncoeffs]; for ( int i=0; i int root_raised_cosine(int order, float Fs, float rolloff, T **coeffs) { float B = rolloff, pi = M_PI; int ncoeffs = (order+1) | 1; *coeffs = new T[ncoeffs]; for ( int i=0; i