[an error occurred while processing this directive]
|
#define BUFFER_SIZE 29unsigned char low_pass_filter (unsigned char sample)
{
unsigned char i = BUFFER_SIZE;
unsigned char j;
unsigned long int out_lp = 0;
int *pCoeff = coeffs_lp;
int *pSample;buffer_lp[offset_input++]=sample;
pSample = &buffer_lp[offset_input];
j = BUFFER_SIZE-offset_input;do
{
out_lp+= (*pCoeff++)*(*pSample++);
if(--j == 0)pSample = buffer_lp;
}while(--i);return (out_lp>>12);
}