summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/include
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-15 16:04:27 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-15 16:04:27 (GMT)
commitaee5707fed8541410816c0a1ce1f0aa17108b462 (patch)
treef2546786adb04fac0b9d9f3999bc27378fcd751d /Graphic_Equalizer/include
parent1db17be5a3ba68ffb5b9b23af6ac52a1b29e89ed (diff)
downloadTASS-aee5707fed8541410816c0a1ce1f0aa17108b462.zip
TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.tar.gz
TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.tar.bz2
Added display of active buttons.
Added equalizer preset storage.
Diffstat (limited to 'Graphic_Equalizer/include')
-rw-r--r--Graphic_Equalizer/include/audio.hch14
-rw-r--r--Graphic_Equalizer/include/configuration.hch2
-rw-r--r--Graphic_Equalizer/include/display.hch2
-rw-r--r--Graphic_Equalizer/include/display_shared.hch18
-rw-r--r--Graphic_Equalizer/include/eventhandler.hch2
-rw-r--r--Graphic_Equalizer/include/eventhandler_shared.hch4
6 files changed, 32 insertions, 10 deletions
diff --git a/Graphic_Equalizer/include/audio.hch b/Graphic_Equalizer/include/audio.hch
index 39fa52d..43666ed 100644
--- a/Graphic_Equalizer/include/audio.hch
+++ b/Graphic_Equalizer/include/audio.hch
@@ -19,15 +19,17 @@
#ifndef _AUDIO_HCH
#define _AUDIO_HCH 1
-
-
/*
* 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];
-};
+typedef struct {
+ mpram {
+ ram unsigned 4 write[768];
+ rom unsigned 4 read[768];
+ } equalizer_levels;
+ unsigned 10 active_preset;
+ unsigned 1 log;
+} audiodata_t;
diff --git a/Graphic_Equalizer/include/configuration.hch b/Graphic_Equalizer/include/configuration.hch
index 6cc644b..3984404 100644
--- a/Graphic_Equalizer/include/configuration.hch
+++ b/Graphic_Equalizer/include/configuration.hch
@@ -97,7 +97,7 @@
/*
* Set the color for various items that will be drawn on screen.
*/
-#define PIXEL_VOLUME_YAXIS (0x00ff00)
+#define PIXEL_VOLUME_YAXIS (0x0000ff)
#define PIXEL_EQUALIZER (0xff0000)
#else
diff --git a/Graphic_Equalizer/include/display.hch b/Graphic_Equalizer/include/display.hch
index 4568b98..c69bf26 100644
--- a/Graphic_Equalizer/include/display.hch
+++ b/Graphic_Equalizer/include/display.hch
@@ -35,7 +35,7 @@
* informs events what the current mask is. To optain the current mask we need
* the X and Y coordinates from our mousedata pointer.
*/
-macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0);
+macro proc display_main(audiodata, events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0);
#else
#error "ERROR file display.hch multiple times included"
diff --git a/Graphic_Equalizer/include/display_shared.hch b/Graphic_Equalizer/include/display_shared.hch
index a3f2cb1..de2e760 100644
--- a/Graphic_Equalizer/include/display_shared.hch
+++ b/Graphic_Equalizer/include/display_shared.hch
@@ -28,7 +28,25 @@
#define AREA_VOLUME_YAXIS 0x02
#define AREA_SPECTRUM_ANALYZER 0x03
+#define BUTTON_LOG 0x04
+#define BUTTON_DEMO 0x05
+#define BUTTON_RESET 0x06
+
+#define BUTTON_PRESET_1 0x07
+#define BUTTON_PRESET_2 0x08
+#define BUTTON_PRESET_3 0x09
+#define BUTTON_PRESET_4 0x0a
+#define BUTTON_PRESET_5 0x0b
+#define BUTTON_PRESET_6 0x0c
+
+#define BUTTON_1 0x0d
+#define BUTTON_2 0x0e
+#define BUTTON_3 0x0f
+#define BUTTON_4 0x10
+#define BUTTON_5 0x11
+
#define BUTTON_HELP 0x12
+#define BUTTON_MODE 0x13
#define AREA_EQUALIZER_MIN 0x80
#define AREA_EQUALIZER_MAX 0xff
diff --git a/Graphic_Equalizer/include/eventhandler.hch b/Graphic_Equalizer/include/eventhandler.hch
index 1ee9099..772e686 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(equalizer_levels, events, mousedata);
+void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *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 90922fb..4711356 100644
--- a/Graphic_Equalizer/include/eventhandler_shared.hch
+++ b/Graphic_Equalizer/include/eventhandler_shared.hch
@@ -30,6 +30,7 @@ typedef struct {
unsigned 10 volume_position;
unsigned ram 9 equalizer_position[128];
unsigned 8 mask;
+ unsigned 3 equalizer_mode;
unsigned 1 help;
} events_t;
@@ -43,11 +44,12 @@ typedef struct {
extern unsigned 5 volumecontrol_table[46];
/*
- * Equalizer lookuptabe.
+ * Equalizer lookup tables.
* TODO: This table is now hardcoded. To ensure full skinability this table
* should be dynamically loaded.
*/
extern unsigned 4 equalizer_table[66];
+extern unsigned 9 equalizer_table_inv[16];