void ZeroPoleFilter( float *In, /* (i) In[0] to In[lengthInOut-1] contain filter input samples In[-orderCoef] to In[-1] contain state of all-zero section */ float *ZeroCoef,/* (i) filter coefficients for all-zero section (ZeroCoef[0] is assumed to be 1.0) */ float *PoleCoef,/* (i) filter coefficients for all-pole section (ZeroCoef[0] is assumed to be 1.0) */ int lengthInOut,/* (i) number of input/output samples */ int orderCoef, /* (i) number of filter coefficients */ float *Out /* (i/o) on entrance Out[-orderCoef] to Out[-1] contain state of all-pole section. On exit Out[0] to Out[lengthInOut-1] contain filtered samples */ ){ AllZeroFilter(In,ZeroCoef,lengthInOut,orderCoef,Out); AllPoleFilter(Out,PoleCoef,lengthInOut,orderCoef); }
/********************* * * FUNCTION: IIRFilter * * DESCRIPTION: IIR filtering of a singal * * ***********************/ void IIRFilter(IIRFILTER_HANDLE hIIRFilter, FLOAT x[], FLOAT y[], INT32 iNrSamples ) { AllZeroFilter(hIIRFilter->hAlZeroFilter,x,y,iNrSamples); AllPoleFilter(hIIRFilter->hAlPoleFilter,y,y,iNrSamples); }