diff src/audacious/effect.c @ 4270:a3d30a174720

Automated merge with ssh://hg.atheme.org//hg/audacious
author Eugene Zagidullin <e.asphyx@gmail.com>
date Sun, 10 Feb 2008 16:03:55 +0300
parents 2b7a74fce100
children aa79a84627b9
line wrap: on
line diff
--- a/src/audacious/effect.c	Sun Feb 10 15:54:47 2008 +0300
+++ b/src/audacious/effect.c	Sun Feb 10 16:03:55 2008 +0300
@@ -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;