summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Lauwerijssen <paranoya@morphcore.com>2004-11-24 15:48:08 (GMT)
committerMarcel Lauwerijssen <paranoya@morphcore.com>2004-11-24 15:48:08 (GMT)
commitcd46168714594a56b173bb394af49f2c5f8fecde (patch)
tree7349cefc623d5f1c30ac4345e2e9d586f59e3e26
parent9b16cb4ce4975745794c94b5d7e8ec975e515aca (diff)
downloadTASS-cd46168714594a56b173bb394af49f2c5f8fecde.zip
TASS-cd46168714594a56b173bb394af49f2c5f8fecde.tar.gz
TASS-cd46168714594a56b173bb394af49f2c5f8fecde.tar.bz2
-rw-r--r--FFT_Test/audio.hch92
1 files changed, 92 insertions, 0 deletions
diff --git a/FFT_Test/audio.hch b/FFT_Test/audio.hch
new file mode 100644
index 0000000..a09fe8d
--- /dev/null
+++ b/FFT_Test/audio.hch
@@ -0,0 +1,92 @@
+/*! \file audio.hch
+ *
+ * \section generic Audiodriver API
+ *
+ * \section project Project information.
+ * Project Graphic Equalizer\n
+ * \author O.M. Schinagl
+ * \date 20041021
+ * \version 0.1
+ *
+ * \section copyright Copyright
+ * Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
+ *
+ * \section history Change history
+ * 20041021: O.M. Schinagl\n Initial version
+ *
+ ********************************************************************/
+
+#ifndef _AUDIO_HCH
+#define _AUDIO_HCH 1
+
+/*
+ * Type definition of the shared memory to be used in various processes
+ */
+typedef struct {
+ mpram {
+ ram unsigned 7 write[256];
+ rom unsigned 7 read[256];
+ } fft_info with { block = "BlockRAM"};
+ mpram {
+ ram signed 6 write[256];
+ rom signed 6 read[256];
+ } ifft_info with { block = "BlockRAM"};
+ mpram {
+ ram unsigned 4 write[768];
+ rom unsigned 4 read[768];
+ } equalizer_levels with { block = "BlockRAM"};
+ unsigned 10 active_preset;
+ unsigned 4 *equalizer_levels_ptr;
+ unsigned 1 display_log;
+} audiodata_t;
+
+
+
+
+/*
+ * States used to indicate wether audio data is sampled.
+ */
+#define AUDIO_NOT_READY 0
+#define AUDIO_READY 1
+
+
+
+/*
+ * Line in or Mic in aliases for audio_init.
+ */
+#define LINE_IN RC200AudioInLineIn
+#define MIC_IN RC200AudioInMicrophone
+
+
+
+/*
+ * Sample Rate Aliases for audio_init.
+ */
+#define SR_8000 RC200AudioSampleRate8000
+#define SR_11025 RC200AudioSampleRate11025
+#define SR_16000 RC200AudioSampleRate16000
+#define SR_22050 RC200AudioSampleRate22050
+#define SR_44100 RC200AudioSampleRate44100
+#define SR_48000 RC200AudioSampleRate48000
+
+
+
+/*
+ * Initialize the Audio sub-system. gain_level sets the internal amplifier to
+ * passed level, input_source chooses between line in or mic in. The
+ * sample_rate is set to supplied rate. Defines for these are mentioned above.
+ */
+macro proc audio_init(gain_level, input_source, sample_rate, AUDIOIN, AUDIOOUT);
+
+
+
+/*
+ * Main audiodriver loop. This procedure never returns! It handles audio io and
+ * updates the shared memory. It needs Audio I/O handlers passed.
+ */
+macro proc audio_main(audiodata, AUDIOIN, AUDIOOUT);
+
+#else
+#error "ERROR file audio.hch multiple times included"
+#endif /* --- _AUDIO_HCH --- */
+