Mercurial > audlegacy
changeset 4586:5fa09aa0b14a
add equalizer changed hook
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Fri, 23 May 2008 15:37:45 +0200 |
parents | 78e21c07ba6a |
children | ab8bc8a89a52 |
files | src/audacious/ui_main_evlisteners.c |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_main_evlisteners.c Thu May 22 19:30:02 2008 +0200 +++ b/src/audacious/ui_main_evlisteners.c Fri May 23 15:37:45 2008 +0200 @@ -106,10 +106,7 @@ g_return_if_fail(entry != NULL); equalizerwin_load_auto_preset(entry->filename); - input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, - cfg.equalizer_bands); - output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, - cfg.equalizer_bands); + hook_call("equalizer changed", NULL); ui_vis_clear_data(mainwin_vis); ui_svis_clear_data(mainwin_svis); @@ -284,6 +281,17 @@ cfg.mainwin_use_bitmapfont); } +static void +ui_main_evlistener_equalizer_changed(gpointer hook_data, gpointer user_data) +{ + /* um .. i think we need both of these for xmms compatibility .. + not sure. -larne */ + input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, + cfg.equalizer_bands); + output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, + cfg.equalizer_bands); +} + void ui_main_evlistener_init(void) { @@ -309,5 +317,7 @@ hook_associate("filebrowser hide", ui_main_evlistener_filebrowser_hide, NULL); hook_associate("visualization timeout", ui_main_evlistener_visualization_timeout, NULL); hook_associate("config save", ui_main_evlistener_config_save, NULL); + + hook_associate("equalizer changed", ui_main_evlistener_equalizer_changed, NULL); }