summaryrefslogtreecommitdiffstats
path: root/FFT_Test
diff options
context:
space:
mode:
Diffstat (limited to 'FFT_Test')
-rw-r--r--FFT_Test/config.hch2
-rw-r--r--FFT_Test/fft_hardware.hcc5
2 files changed, 4 insertions, 3 deletions
diff --git a/FFT_Test/config.hch b/FFT_Test/config.hch
index 75f20ad..a705c61 100644
--- a/FFT_Test/config.hch
+++ b/FFT_Test/config.hch
@@ -4,7 +4,7 @@
#define NUMBER_OF_FREQUENCIES (NUMBER_OF_POINTS>>1)
#if HARDWARE_MULTIPLY
-#define DC_COMPONENT 131072
+#define DC_COMPONENT 0
#else
#define DC_COMPONENT 8470527
#endif
diff --git a/FFT_Test/fft_hardware.hcc b/FFT_Test/fft_hardware.hcc
index d716aa8..9e1b6ba 100644
--- a/FFT_Test/fft_hardware.hcc
+++ b/FFT_Test/fft_hardware.hcc
@@ -365,8 +365,9 @@ void equalize_audio(unsigned 4 *eq_level, unsigned 7 *fft_info)
for(i=0;i<=NUMBER_OF_FREQUENCIES;i++)
{
- // set multiplication factor (0..64) for current frequency bar
- a = adjs(eq_settings[eq_level[i<-7]],18);
+ // set multiplication factor (0..64) for current frequency bar, The first frequency band must be equalized at 100% (63) since there is no DC-component taken into account.
+ a = (i==0) : 63 ? adjs(eq_settings[eq_level[i<-7]],18);
+
// multiply frequency with this factor and divide by 64 (drop 6 LSB's)
q = real.read[i];