summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/include/fft.hch
blob: 1c5d1cfbe3a5c71f986784eb8b0fcbde99f43b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);