summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer_v1.0/include/fft.hch
diff options
context:
space:
mode:
Diffstat (limited to 'Graphic_Equalizer_v1.0/include/fft.hch')
-rw-r--r--Graphic_Equalizer_v1.0/include/fft.hch35
1 files changed, 35 insertions, 0 deletions
diff --git a/Graphic_Equalizer_v1.0/include/fft.hch b/Graphic_Equalizer_v1.0/include/fft.hch
new file mode 100644
index 0000000..1c5d1cf
--- /dev/null
+++ b/Graphic_Equalizer_v1.0/include/fft.hch
@@ -0,0 +1,35 @@
+#define NUMBER_OF_COLUMNS 8
+#define NUMBER_OF_POINTS (1<<NUMBER_OF_COLUMNS)
+#define NUMBER_OF_FREQUENCIES (NUMBER_OF_POINTS>>1)
+#define WINDOW_SIZE (NUMBER_OF_POINTS>>2)
+
+#if HARDWARE_MULTIPLY
+/*
+ * This routine obtains the audio data from the audio I/O component and copies this
+ * data to local arrays for calculating purposes, and calls the FFT algorithm.
+*/
+void perform_fft(signed 18 *pcm_audio);
+
+/* This routine calls the ifft algorithm and after completing that it obtains the
+ * modified audio data and copies that to the output arrays of the audio I/O component.
+ * Besides that it also fills the array used by the display routine for displaying the waveform.
+*/
+void perform_ifft(signed 18 *modified_audio ,unsigned 6 *ifft_info);
+#else
+/*
+ * This routine obtains the audio data from the audio I/O component and copies this
+ * data to local arrays for calculating purposes, and calls the FFT algorithm.
+*/
+void perform_fft(signed 16 *pcm_audio);
+
+/* This routine calls the ifft algorithm and after completing that it obtains the
+ * modified audio data and copies that to the output arrays of the audio I/O component.
+ * Besides that it also fills the array used by the display routine for displaying the waveform.
+*/
+void perform_ifft(signed 16 *modified_audio ,unsigned 6 *ifft_info);
+#endif
+
+/* This routine equalizes the frequencies derived by the FFT calculation,
+ * according to the settings of the equalizer bars.
+*/
+void equalize_audio(audiodata_t *audiodata);