summaryrefslogtreecommitdiffstats
path: root/FFT_Test/fft.hcc
diff options
context:
space:
mode:
Diffstat (limited to 'FFT_Test/fft.hcc')
-rw-r--r--FFT_Test/fft.hcc68
1 files changed, 22 insertions, 46 deletions
diff --git a/FFT_Test/fft.hcc b/FFT_Test/fft.hcc
index 30feb98..644db28 100644
--- a/FFT_Test/fft.hcc
+++ b/FFT_Test/fft.hcc
@@ -1,8 +1,8 @@
-/*! \file eventhandler.hcc
+/*! \file fft.hcc
*
- * \section generic This modules coordinates all events. Thus for example
- * when the mousehandler registers a 'click' we coordinate
- * the actions that follow that click.
+ * \section generic This modules will take care of the actual FFT calculation
+ * on the samples. Besides the FFT this module also will
+ * equalize the audio signal according to the setting made by the user.
*
* \section project Project information.
* Project Graphic Equalizer\n
@@ -63,7 +63,7 @@ ram signed 7 eq_settings[16] = {0,2,4,7,10,13,16,19,22,26,30,35,41,48,55,63};
/*! \fn macro proc multiply(result, op_a, op_b);
- * \brief
+ * \brief Procedure used for multiply-ing
*
* \param result variable containing the result of the multiply procedure
* \param op_a integer value to be multiplied.
@@ -183,16 +183,14 @@ static macro proc FFTRun ()
/*! \fn void calculate_fft(unsigned 1 select_inverse)
- * \brief
+ * \brief This routine performs the Fast Fourier Transform for calculation of the frequency spectrum
*
- * \param unsigned 1 select_inverse determines if a FFT or iFFT has to be calculated
+ * \param select_inverse determines if a FFT or iFFT has to be calculated
*
* \return nothing
* \retval void
*
- * \cost 12391 cycles
- *
- * \desc This routine performs the Fast Fourier Transform for calculation of the frequency spectrum
+ * cost 12391 cycles
*/
void calculate_fft(unsigned 1 select_inverse)
{
@@ -335,17 +333,15 @@ void calculate_fft(unsigned 1 select_inverse)
}
/*! \fn void perform_fft(signed 18 *pcm_audio)
- * \brief
+ * \brief 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.
*
- * \param signed 18 *pcm_audio pointer to array containg the audio data
+ * \param *pcm_audio pointer to array containg the audio data
*
* \return nothing
* \retval void
*
- * \cost 258 cycles (excl. the calculate FFT function)
- *
- * \desc This routine obtains the audio data from the audio I/O component and copies this
- * \desc data to local arrays for calculating purposes, and calls the FFT algorithm.
+ * cost 258 cycles (excl. the calculate FFT function)
*/
#if HARDWARE_MULTIPLY
void perform_fft(signed 18 *pcm_audio)
@@ -400,19 +396,17 @@ void perform_fft(signed 16 *pcm_audio)
}
/*! \fn void perform_ifft(signed 18 *modified_audio, unsigned 6 *ifft_info)
- * \brief
+ * \brief 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.
*
- * \param signed 18 *modified_audio pointer to array containg the audio data
- * \param unsigned 6 *ifft_info Pointer to the ifft_info array containing the modified waveform data for display purposes
+ * \param *modified_audio pointer to array containg the audio data
+ * \param *ifft_info Pointer to the ifft_info array containing the modified waveform data for display purposes
*
* \return nothing
* \retval void
*
- * \cost 258 cycles (excl. the calculate iFFT function)
- *
- * \desc This routine calls the ifft algorithm and after completing that it obtains the
- * \desc modified audio data and copies that to the output arrays of the audio I/O component.
- * \desc Besides that it also fills the array used by the display routine for displaying the waveform.
+ * cost 258 cycles (excl. the calculate iFFT function)
*/
#if HARDWARE_MULTIPLY
void perform_ifft(signed 18 *modified_audio, unsigned 6 *ifft_info)
@@ -481,35 +475,17 @@ void perform_ifft(signed 16 *modified_audio, unsigned 6 *ifft_info)
}
/*! \fn void equalize_audio(audiodata_t *audiodata)
- * \brief
+ * \brief This routine equalizes the frequencies derived by the FFT calculation,
+ * according to the settings of the equalizer bars.
*
- * \param audiodata_t *audiodata pointer to the audiodata struct, containing the eq_info, etc.
+ * \param *audiodata pointer to the audiodata struct, containing the eq_info, etc.
*
* \return nothing
* \retval void
*
- * \cost 3844 cycles (Maximum)
+ * cost 3844 cycles (Maximum)
*
- * \desc This routine equalizes the frequencies derived by the FFT calculation,
- * \desc according to the settings of the equalizer bars.
*/
-/*******************************************************************
-* Function: equalize_audio *
-* *
-* Arguments *
-* audiodata Pointer to the audiodata structure *
-* *
-* *
-* *
-* Description *
-* This routine equalizes the frequencies derived by the FFT *
-* calculation, according to the settings of the equalizer *
-* bars. *
-* *
-* *
-* Cost: 3844 cycles (Maximum) *
-* *
-*******************************************************************/
void equalize_audio(audiodata_t *audiodata)
{
#if HARDWARE_MULTIPLY