Mercurial > audlegacy
diff src/audacious/effect.c @ 4266:2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
| author | stefano@zanga |
|---|---|
| date | Sun, 10 Feb 2008 12:31:44 +0100 |
| parents | 65b9207fb7b2 |
| children | aa79a84627b9 |
line wrap: on
line diff
--- a/src/audacious/effect.c Sun Feb 10 10:40:51 2008 +0100 +++ b/src/audacious/effect.c Sun Feb 10 12:31:44 2008 +0100 @@ -29,6 +29,7 @@ #include <glib.h> #include <string.h> #include "plugin.h" +#include "pluginenum.h" EffectPluginData ep_data = { NULL, @@ -45,7 +46,10 @@ if (l->data) { EffectPlugin *ep = l->data; if (ep->mod_samples) + { + plugin_set_current((Plugin *)ep); length = ep->mod_samples(data, length, fmt, srate, nch); + } } l = g_list_next(l); } @@ -62,7 +66,10 @@ if (l->data) { EffectPlugin *ep = l->data; if (ep->query_format) + { + plugin_set_current((Plugin *)ep); ep->query_format(fmt, rate, nch); + } } l = g_list_next(l); } @@ -87,12 +94,18 @@ if (enable && !ep->enabled) { ep_data.enabled_list = g_list_append(ep_data.enabled_list, ep); if (ep->init) + { + plugin_set_current((Plugin *)ep); ep->init(); + } } else if (!enable && ep->enabled) { ep_data.enabled_list = g_list_remove(ep_data.enabled_list, ep); if (ep->cleanup) + { + plugin_set_current((Plugin *)ep); ep->cleanup(); + } } ep->enabled = enable; @@ -150,7 +163,10 @@ ep_data.enabled_list = g_list_append(ep_data.enabled_list, ep); if (ep->init) + { + plugin_set_current((Plugin *)ep); ep->init(); + } } g_free(base); node = node->next;
