summaryrefslogtreecommitdiffstats
path: root/FFT_Test/main.hcc
diff options
context:
space:
mode:
Diffstat (limited to 'FFT_Test/main.hcc')
-rw-r--r--FFT_Test/main.hcc80
1 files changed, 80 insertions, 0 deletions
diff --git a/FFT_Test/main.hcc b/FFT_Test/main.hcc
new file mode 100644
index 0000000..088305a
--- /dev/null
+++ b/FFT_Test/main.hcc
@@ -0,0 +1,80 @@
+/****************************************************************
+* *
+* Copyright (C) 1991-2003 Celoxica Ltd. All rights reserved. *
+* *
+*****************************************************************
+* *
+* Project : PAL *
+* Date : 31 JAN 2003 *
+* File : reverb.hcc *
+* Author : Matthew Aubury (MA) *
+* Contributors: *
+* *
+* Description: *
+* Simple audio reverb. *
+* *
+* Date Version Author Reason for change *
+* *
+* 29 OCT 2002 1.00 MA Created *
+* *
+****************************************************************/
+#define PAL_TARGET_CLOCK_RATE 25175000
+
+
+#include <stdlib.hch>
+#include "pal_master.hch"
+
+#include "runfft.hch"
+#include "debug.hch"
+
+/*
+ * Forward declarations
+ */
+
+static macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;
+
+/*
+ * Main program
+ */
+void main(void)
+{
+ macro expr AudioIn = PalAudioInCT (0);
+ macro expr AudioOut = PalAudioOutCT (0);
+
+ /*
+ * Check we've got everything we need
+ */
+ PalVersionRequire (1, 2);
+ PalAudioInRequire (1);
+ PalAudioOutRequire (1);
+ PalDataPortRequire (1);
+
+
+ /*
+ * Run
+ */
+ par
+ {
+ PalAudioInRun (AudioIn, ClockRate);
+ PalAudioOutRun (AudioOut, ClockRate);
+ PalDataPortRun (PalRS232PortCT(0), PAL_ACTUAL_CLOCK_RATE );
+
+
+ seq
+ {
+ par
+ {
+ PalAudioInEnable (AudioIn);
+ PalAudioOutEnable (AudioOut);
+ PalDataPortEnable (PalRS232PortCT(0));
+
+ }
+ RC200AudioInSetInput(RC200AudioInLineIn);
+ RC200AudioInSetGain(0,6,6);
+ PalAudioInSetSampleRate (AudioIn, 44100);
+ PalAudioOutSetSampleRate (AudioOut, 44100);
+
+ RunFFT(AudioIn, AudioOut);
+ }
+ }
+}