Bug in FIRFilter ?
Posted: 03 Dec 2010, 07:26
Just wanted to know if this is a bug in FIRFilter or only a problem with my setup. I generated Filter coefficients with matlab and the output of FIRFilter looks completly different than i expect it to be.
changing following line
to
solved the problem. Seems like there is some internal int casting going on due to the 0
changing following line
Code: Select all
result[sample] = inner_product( &mFilter[channel][0], &mFilter[channel][filterLength-1], &mBuffer[channel][sample], 0 );Code: Select all
result[sample] = inner_product( &mFilter[channel][0], &mFilter[channel][filterLength-1], &mBuffer[channel][sample], 0.0);