summaryrefslogtreecommitdiffstats
path: root/FFT_Test/runfft.hcc
diff options
context:
space:
mode:
Diffstat (limited to 'FFT_Test/runfft.hcc')
-rw-r--r--FFT_Test/runfft.hcc33
1 files changed, 14 insertions, 19 deletions
diff --git a/FFT_Test/runfft.hcc b/FFT_Test/runfft.hcc
index 0c1c371..25a019a 100644
--- a/FFT_Test/runfft.hcc
+++ b/FFT_Test/runfft.hcc
@@ -25,9 +25,7 @@
#include "configuration.hch"
#if USE_RUNFFT
-#include "audio.hch"
#include "fft.hch"
-
#include "debug.hch"
/*
@@ -35,12 +33,8 @@
*/
static macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;
-//EQ settings for the FFT
-ram unsigned 4 EQ_info[128] with { block = "BlockRAM"};
-//EQ settings received from the display
-
-extern mpram DualPortRam AudioIn;
-extern mpram DualPortRam AudioOut;
+extern mpram DualPortInputRam AudioIn;
+extern mpram DualPortOutputRam AudioOut;
extern chan unsigned 1 AudioOutReady;
chan unsigned 1 AudioInReady;
@@ -58,24 +52,25 @@ signed 16 *audioptr_out1,*audioptr_out2;
#endif
-/*
- * FFT routine
+/*! \fn macro proc audio_main(AUDIOIN, AUDIOOUT);
+ * \brief
+ *
+ * \param AUDIOIN Handle to audio-input
+ * \param AUDIOOUT Handle to audio-output
+ *
+ * \return Never Returns.
+ * \retval void
*/
macro proc audio_main(AUDIOIN, AUDIOOUT)
{
- signed 18 sample;
unsigned 6 sample_count;
- unsigned 8 i,cycle;
- unsigned 4 eqinfo;
- unsigned 1 FFT_Sync, first;
+ unsigned 1 FFT_Sync;
macro expr OW = PalAudioOutGetMaxDataWidthCT ();
macro expr IW = PalAudioInGetMaxDataWidthCT ();
signed LeftNew, RightNew;
signed Output_sample;
- ram unsigned 6 input[64];
-
//pointers for double and quadruple buffering:
audioptr_in1 = &AudioIn.audio_io[0];
audioptr_in2 = &AudioIn.audio_io[64];
@@ -88,7 +83,7 @@ macro proc audio_main(AUDIOIN, AUDIOOUT)
FFT_Sync=0;
par
{
- for(;;)
+ for(;;)//Notify FFT loop.
{
if (FFT_Sync) //if 64 samples are read from ADC...
{
@@ -112,7 +107,7 @@ par
delay;
}
- for(sample_count=0;;)//store the samples in the inputbuffer
+ for(sample_count=0;;)//Audiosampling loop
{
if (!FFT_Sync)
{
@@ -143,7 +138,7 @@ par
delay;
}
}
- for(;;)
+ for(;;)//Audio output-loop
{
PalAudioOutWrite(AUDIOOUT,(signed OW)(Output_sample @ 0),(signed OW)(Output_sample @ 0));
}