Goertzel's works!

This commit is contained in:
cnlohr
2024-06-24 01:20:02 -07:00
parent 64335ae653
commit 5067970ec3
7 changed files with 100 additions and 518 deletions
+2 -2
View File
@@ -51,14 +51,14 @@ int main()
t = sin( AomegaPerSample * (x+js*4) ) * 16384*0; \
\
/* Fixed */ \
goertzel = t + ( ( (((int32_t)(goertzel_coefficient))) * ((((int64_t)goertzelp)<<2)) ) >> 32 ) - goertzelp2; \
goertzelp2 = goertzelp; \
goertzelp = goertzel; \
goertzel = t + ( ( (((int32_t)(goertzel_coefficient))) * ((((int64_t)goertzelp)<<2)) ) >> 32 ) - goertzelp2; \
\
/* Float */ \
As = t + ( Acoeff * Asprev ) / 65536.0 - Asprev2; \
Asprev2 = Asprev; \
Asprev = As; \
As = t + ( Acoeff * Asprev ) / 65536.0 - Asprev2; \
\
/*printf( "%d,%d,%d,%d\n", ( ( (int64_t)(goertzel_coefficient) * (int64_t)goertzelp ) >> 32 ) , goertzel_coefficient, goertzelp, goertzelp2 ); */ \
\