Mercurial > audlegacy
comparison 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 |
comparison
equal
deleted
inserted
replaced
4847:d13bf8d71b99 | 4848:b2ee645f3e59 |
---|---|
16 * The Audacious team does not consider modular code linking to | 16 * The Audacious team does not consider modular code linking to |
17 * Audacious or using our public API to be a derived work. | 17 * Audacious or using our public API to be a derived work. |
18 */ | 18 */ |
19 | 19 |
20 #include "equalizer.h" | 20 #include "equalizer.h" |
21 #include "hook.h" | |
21 #include "output.h" | 22 #include "output.h" |
22 | 23 |
23 #include "audconfig.h" | 24 #include "audconfig.h" |
24 #include "legacy/ui_equalizer.h" | 25 #include "legacy/ui_equalizer.h" |
26 | |
27 static void change_equalizer (void) { | |
28 output_set_eq (cfg.equalizer_active, cfg.equalizer_preamp, | |
29 cfg.equalizer_bands); | |
30 } | |
31 | |
32 void init_equalizer (void) { | |
33 hook_register ("equalizer changed"); | |
34 if (hook_associate ("equalizer changed", (HookFunction) change_equalizer, 0)) | |
35 abort (); | |
36 } | |
25 | 37 |
26 gfloat | 38 gfloat |
27 equalizer_get_preamp(void) | 39 equalizer_get_preamp(void) |
28 { | 40 { |
29 return equalizerwin_get_preamp(); | 41 return equalizerwin_get_preamp(); |