diff options
author | waker <wakeroid@gmail.com> | 2011-03-15 20:30:24 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-03-15 20:30:24 +0100 |
commit | 56d4777f9b6648ac2b383795194b976c8c68018b (patch) | |
tree | 169ef97f5762279538412bbed2a69d4c8f784746 | |
parent | 5f38b54305d03202e67ec4f5a1cbc09a45366828 (diff) |
added streamer_dsp_refresh api entry;
fixed switching eq on/off
-rw-r--r-- | deadbeef.h | 1 | ||||
-rw-r--r-- | plugins.c | 1 | ||||
-rw-r--r-- | plugins/gtkui/eq.c | 1 | ||||
-rw-r--r-- | streamer.c | 7 | ||||
-rw-r--r-- | streamer.h | 3 |
5 files changed, 13 insertions, 0 deletions
@@ -328,6 +328,7 @@ typedef struct { int (*streamer_get_current_playlist) (void); struct ddb_dsp_context_s * (*streamer_get_dsp_chain) (void); void (*streamer_set_dsp_chain) (struct ddb_dsp_context_s *chain); + void (*streamer_dsp_refresh) (void); // call after changing parameters // system folders // normally functions will return standard folders derived from --prefix // portable version will return pathes specified in comments below @@ -85,6 +85,7 @@ static DB_functions_t deadbeef_api = { .streamer_get_current_playlist = streamer_get_current_playlist, .streamer_get_dsp_chain = streamer_get_dsp_chain, .streamer_set_dsp_chain = streamer_set_dsp_chain, + .streamer_dsp_refresh = streamer_dsp_refresh, // folders .get_config_dir = plug_get_config_dir, .get_prefix = plug_get_prefix, diff --git a/plugins/gtkui/eq.c b/plugins/gtkui/eq.c index 067ce064..4cef6a4f 100644 --- a/plugins/gtkui/eq.c +++ b/plugins/gtkui/eq.c @@ -78,6 +78,7 @@ on_enable_toggled (GtkToggleButton *togglebutton, if (eq) { int enabled = gtk_toggle_button_get_active (togglebutton) ? 1 : 0; eq->enabled = enabled; + deadbeef->streamer_dsp_refresh (); } } @@ -1362,6 +1362,13 @@ streamer_dsp_postinit (void) { } void +streamer_dsp_refresh (void) { + mutex_lock (decodemutex); + streamer_dsp_postinit (); + mutex_unlock (decodemutex); +} + +void streamer_dsp_init (void) { // load dsp chain from file char fname[PATH_MAX]; @@ -114,4 +114,7 @@ streamer_get_dsp_chain (void); void streamer_set_dsp_chain (struct ddb_dsp_context_s *chain); +void +streamer_dsp_refresh (void); + #endif // __STREAMER_H |