From 2c8a022aca2b90e76121430bd954c9a02927f452 Mon Sep 17 00:00:00 2001 From: bbkiwi Date: Sun, 19 Aug 2018 23:36:30 +1200 Subject: [PATCH] samples need to be accumulated at each call of HandleInt special processing should start the scheduling Before fix some signals containing a harmonic of FREQ/16 would producing peaks at all harmonics of FREQ/16. --- embeddedcommon/DFT32.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/embeddedcommon/DFT32.c b/embeddedcommon/DFT32.c index 21df4dd..2f92eb6 100644 --- a/embeddedcommon/DFT32.c +++ b/embeddedcommon/DFT32.c @@ -199,11 +199,17 @@ static void HandleInt( int16_t sample ) Swhichoctaveplace ++; Swhichoctaveplace &= BINCYCLE-1; + for( i = 0; i < OCTAVES;i++ ) + { + Saccum_octavebins[i] += sample; + } + if( oct > 128 ) { //Special: This is when we can update everything. - //This gets run one out of every 1/(1<