summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/eventhandler.hcc
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-16 09:07:49 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-16 09:07:49 (GMT)
commit0a9c7d08968e20efbbded3dc2a0e9081823610be (patch)
treead77076cff584e9ec20e61092bf3209950b0bc61 /Graphic_Equalizer/src/eventhandler.hcc
parent2550e155ac6b08475039b24d44f4e08d1d1c53fc (diff)
downloadTASS-0a9c7d08968e20efbbded3dc2a0e9081823610be.zip
TASS-0a9c7d08968e20efbbded3dc2a0e9081823610be.tar.gz
TASS-0a9c7d08968e20efbbded3dc2a0e9081823610be.tar.bz2
Merged FFT into Graphic Equalizer.
Diffstat (limited to 'Graphic_Equalizer/src/eventhandler.hcc')
-rw-r--r--Graphic_Equalizer/src/eventhandler.hcc11
1 files changed, 8 insertions, 3 deletions
diff --git a/Graphic_Equalizer/src/eventhandler.hcc b/Graphic_Equalizer/src/eventhandler.hcc
index 1ec8468..6194a77 100644
--- a/Graphic_Equalizer/src/eventhandler.hcc
+++ b/Graphic_Equalizer/src/eventhandler.hcc
@@ -47,6 +47,7 @@ extern chan unsigned 1 maskupdate_notification;
* \retval void
*/
void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mousedata) {
+ unsigned 10 preset_offset;
unsigned 8 equalizer_bands;
unsigned 5 volume_left;
unsigned 1 newmaskupdate;
@@ -55,6 +56,10 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo
maskupdate_notification ? newmaskupdate;
/*
+ */
+ preset_offset = 0 @ events->mask -AREA_EQUALIZER_MIN;
+
+ /*
* First we determine what mousestate we currently have. Then
* we check where we are to decide what to do.
*/
@@ -86,7 +91,7 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo
}
if (BUTTON_LOG == events->mask) {
- audiodata->log = !audiodata->log;
+ audiodata->display_log = !audiodata->display_log;
} else {
delay;
}
@@ -132,7 +137,7 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo
* The index is determined by the mask
* minus the maskoffset.
*/
- events->equalizer_position[(events->mask -AREA_EQUALIZER_MIN) <- 7] = mousedata->y;
+ events->equalizer_position[preset_offset <- 7] = mousedata->y;
/*
* We look our current possition up in
* the lookup table. We determin our
@@ -147,7 +152,7 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo
* TODO: lock equalizer store with a
* semaphore!
*/
- audiodata->equalizer_levels.write[(( 0 @ events->mask -AREA_EQUALIZER_MIN) +(audiodata->active_preset << 7))] = equalizer_table[((mousedata->y) -382) <- 7];
+ audiodata->equalizer_levels.write[(preset_offset +(audiodata->active_preset << 7))] = equalizer_table[((mousedata->y) -382) <- 7];
} else {
delay;
}