diff --git a/cmProc4.c b/cmProc4.c index d29640f..89fe6d5 100644 --- a/cmProc4.c +++ b/cmProc4.c @@ -4559,8 +4559,8 @@ cmRC_t cmGoertzelExec( cmGoertzel* p, const cmSample_t* x, unsigned procSmpCnt, { cmGoertzelCh* ch = p->ch + i; - ch->s1 = x[0]; - ch->s2 = x[1] + 2 * x[0] * ch->coeff; + ch->s2 = x[0]; + ch->s1 = x[1] + 2 * x[0] * ch->coeff; for(j=2; js0 = x[j] + ch->coeff * ch->s1 - ch->s2; @@ -4573,3 +4573,5 @@ cmRC_t cmGoertzelExec( cmGoertzel* p, const cmSample_t* x, unsigned procSmpCnt, return cmOkRC; } + + diff --git a/cmProc4.h b/cmProc4.h index 5a68ffa..3514e3e 100644 --- a/cmProc4.h +++ b/cmProc4.h @@ -723,7 +723,6 @@ extern "C" { cmRC_t cmGoertzelExec( cmGoertzel* p, const cmSample_t* in, unsigned procSmpCnt, double* outV, unsigned chCnt ); - #ifdef __cplusplus } #endif