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.hcc7
1 files changed, 3 insertions, 4 deletions
diff --git a/FFT_Test/fft_hardware.hcc b/FFT_Test/fft_hardware.hcc
index 9e1b6ba..5c209e8 100644
--- a/FFT_Test/fft_hardware.hcc
+++ b/FFT_Test/fft_hardware.hcc
@@ -334,13 +334,12 @@ void perform_ifft(signed 16 *modified_audio/*, unsigned 6 *ifft_info*/)
/********************************************************************/
void equalize_audio(unsigned 4 *eq_level, unsigned 7 *fft_info)
{
-#if 1
#if HARDWARE_MULTIPLY
signed 18 p,q;
#else
signed 24 p,q;
#endif
- signed 16 a;
+ signed 18 a;
unsigned 8 i, mirror_i, bit, m, n;
unsigned 7 old_value;
unsigned 9 tmp;
@@ -363,10 +362,10 @@ void equalize_audio(unsigned 4 *eq_level, unsigned 7 *fft_info)
// imaginary.rwrite[0] = 0; // remove DC component
- for(i=0;i<=NUMBER_OF_FREQUENCIES;i++)
+ for(i=0;i!=NUMBER_OF_FREQUENCIES;i++)
{
// 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);
+ 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)