# HG changeset patch # User mru # Date 1247134560 0 # Node ID 2cd0d1447bd3823809ac9f8bc4bcf013bd343156 # Parent f91d6810f98301ecb19997d033bd36e37a30fbab Fix declarations of complex numbers Complex numbers must be declared using a base type of float, double, or long double. diff -r f91d6810f983 -r 2cd0d1447bd3 iirfilter.c --- a/iirfilter.c Wed Jul 08 23:14:47 2009 +0000 +++ b/iirfilter.c Thu Jul 09 10:16:00 2009 +0000 @@ -56,7 +56,7 @@ int i, j, size; FFIIRFilterCoeffs *c; double wa; - complex p[MAXORDER + 1]; + double complex p[MAXORDER + 1]; if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS) return NULL; @@ -78,7 +78,7 @@ for(i = 1; i <= order; i++) p[i] = 0.0; for(i = 0; i < order; i++){ - complex zp; + double complex zp; double th = (i + (order >> 1) + 0.5) * M_PI / order; zp = cexp(I*th) * wa; zp = (zp + 2.0) / (zp - 2.0);