Mercurial > audlegacy
diff src/audlegacy/equalizer.c @ 4848:b2ee645f3e59
Hook up the equalizer (bug #24)
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Sun, 12 Apr 2009 23:03:39 -0400 |
parents | e286934cd9f2 |
children | 47b72fc78e92 |
line wrap: on
line diff
--- a/src/audlegacy/equalizer.c Sun Apr 12 19:58:12 2009 -0400 +++ b/src/audlegacy/equalizer.c Sun Apr 12 23:03:39 2009 -0400 @@ -18,11 +18,23 @@ */ #include "equalizer.h" +#include "hook.h" #include "output.h" #include "audconfig.h" #include "legacy/ui_equalizer.h" +static void change_equalizer (void) { + output_set_eq (cfg.equalizer_active, cfg.equalizer_preamp, + cfg.equalizer_bands); +} + +void init_equalizer (void) { + hook_register ("equalizer changed"); + if (hook_associate ("equalizer changed", (HookFunction) change_equalizer, 0)) + abort (); +} + gfloat equalizer_get_preamp(void) {