summaryrefslogtreecommitdiffstats
path: root/FFT_Test/fft_hardware.hcc
diff options
context:
space:
mode:
Diffstat (limited to 'FFT_Test/fft_hardware.hcc')
-rw-r--r--FFT_Test/fft_hardware.hcc13
1 files changed, 3 insertions, 10 deletions
diff --git a/FFT_Test/fft_hardware.hcc b/FFT_Test/fft_hardware.hcc
index 8977a83..d716aa8 100644
--- a/FFT_Test/fft_hardware.hcc
+++ b/FFT_Test/fft_hardware.hcc
@@ -357,11 +357,8 @@ void equalize_audio(unsigned 4 *eq_level, unsigned 7 *fft_info)
retval = result[29:6]; //drop last 6 bit to compensate the maximum multiplication with 64 from the eq_settings array
#endif
}
-#if HARDWARE_MULTIPLY
- p = real.read[0] - DC_COMPONENT_HARDWARE;
-#else
+
p = real.read[0] - DC_COMPONENT; // remove DC component for calculations
-#endif
real.rwrite[0] = p;
// imaginary.rwrite[0] = 0; // remove DC component
@@ -369,7 +366,7 @@ 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 = 63;// adjs(eq_settings[eq_level[i<-7]],16);
+ a = 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];
@@ -439,11 +436,7 @@ void equalize_audio(unsigned 4 *eq_level, unsigned 7 *fft_info)
}
// add DC component again before inverse FFT calculation is performed
-#if HARDWARE_MULTIPLY
- p = real.read[0] + DC_COMPONENT_HARDWARE;
-#else
+
p = real.read[0] + DC_COMPONENT;
-#endif
real.rwrite[0] = p;
-#endif
}