summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/include
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-11 16:13:58 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-11 16:13:58 (GMT)
commit27405f4f8c65baabb28ce427912851be10207781 (patch)
tree3a090403142563d916a8cbb5ef8a3c4113a5b6ae /Graphic_Equalizer/include
parent9877678730e53e9ee99241a8ab5babe35eacf28d (diff)
downloadTASS-27405f4f8c65baabb28ce427912851be10207781.zip
TASS-27405f4f8c65baabb28ce427912851be10207781.tar.gz
TASS-27405f4f8c65baabb28ce427912851be10207781.tar.bz2
Added fft files
fixed some issues, included equalizer.
Diffstat (limited to 'Graphic_Equalizer/include')
-rw-r--r--Graphic_Equalizer/include/audio.hch13
-rw-r--r--Graphic_Equalizer/include/configuration.hch6
-rw-r--r--Graphic_Equalizer/include/eventhandler.hch2
-rw-r--r--Graphic_Equalizer/include/eventhandler_shared.hch3
-rw-r--r--Graphic_Equalizer/include/fft.hch8
5 files changed, 24 insertions, 8 deletions
diff --git a/Graphic_Equalizer/include/audio.hch b/Graphic_Equalizer/include/audio.hch
index ff4a4fc..39fa52d 100644
--- a/Graphic_Equalizer/include/audio.hch
+++ b/Graphic_Equalizer/include/audio.hch
@@ -24,6 +24,11 @@
/*
* Type definition of the shared memory to be used in various processes
*/
+mpram equalizer_levels_t {
+ ram unsigned 4 write[768];
+ rom unsigned 4 read[768];
+};
+
@@ -60,15 +65,15 @@
* 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);
+macro proc audio_init(gain_level, input_source, sample_rate, AUDIOIN, AUDIOOUT);
/*
- * Main audiodriver loop. This procedure never returns! It handles audio io,
- * updates the shared memory and notifies listeners.
+ * Main audiodriver loop. This procedure never returns! It handles audio io and
+ * updates the shared memory. It needs Audio I/O handlers passed.
*/
-void audio_main(void);
+macro proc audio_main(AUDIOIN, AUDIOOUT);
#else
#error "ERROR file audio.hch multiple times included"
diff --git a/Graphic_Equalizer/include/configuration.hch b/Graphic_Equalizer/include/configuration.hch
index 7db28bc..6cc644b 100644
--- a/Graphic_Equalizer/include/configuration.hch
+++ b/Graphic_Equalizer/include/configuration.hch
@@ -32,8 +32,9 @@
* routines. To only load the mask and not the entire data set USE_MASK_ONLY to
* 1. 0 will load all bitmaps.
*/
-#define HAVE_SMARTMEDIA 1
+#define HAVE_SMARTMEDIA 0
#define USE_MASK_ONLY 1
+#define SKIP_LOAD 1
@@ -96,7 +97,8 @@
/*
* Set the color for various items that will be drawn on screen.
*/
-#define PIXEL_VOLUME_YAXIS (0x00ff00)
+#define PIXEL_VOLUME_YAXIS (0x00ff00)
+#define PIXEL_EQUALIZER (0xff0000)
#else
#error "ERROR file configuration.hch multiple times included"
diff --git a/Graphic_Equalizer/include/eventhandler.hch b/Graphic_Equalizer/include/eventhandler.hch
index b8f5ca9..1ee9099 100644
--- a/Graphic_Equalizer/include/eventhandler.hch
+++ b/Graphic_Equalizer/include/eventhandler.hch
@@ -27,7 +27,7 @@
* to store actions to be performed and a mousedata pointer so that we know on
* what mousestate to respond. We never returns!
*/
-macro proc eventhandler_main(events, mousedata);
+macro proc eventhandler_main(equalizer_levels, events, mousedata);
#else
#error "ERROR file eventhandler.hch multiple times included"
diff --git a/Graphic_Equalizer/include/eventhandler_shared.hch b/Graphic_Equalizer/include/eventhandler_shared.hch
index 342bb0b..90922fb 100644
--- a/Graphic_Equalizer/include/eventhandler_shared.hch
+++ b/Graphic_Equalizer/include/eventhandler_shared.hch
@@ -27,9 +27,10 @@
* Type definition of the shared memory to be used in various processes
*/
typedef struct {
- unsigned 1 help;
unsigned 10 volume_position;
+ unsigned ram 9 equalizer_position[128];
unsigned 8 mask;
+ unsigned 1 help;
} events_t;
diff --git a/Graphic_Equalizer/include/fft.hch b/Graphic_Equalizer/include/fft.hch
new file mode 100644
index 0000000..6bcc8cc
--- /dev/null
+++ b/Graphic_Equalizer/include/fft.hch
@@ -0,0 +1,8 @@
+#if HARDWARE_MULTIPLY
+void perform_fft(signed 18 *pcm_audio);
+void perform_ifft(signed 18 *modified_audio /*,unsigned 6 *ifft_info*/);
+#else
+void perform_fft(signed 16 *pcm_audio);
+void perform_ifft(signed 16 *modified_audio /*,unsigned 6 *ifft_info*/);
+#endif
+void equalize_audio(unsigned 4 *eq_level, unsigned 7 *fft_info);