# HG changeset patch # User nenolod # Date 1134851789 28800 # Node ID b04ce1c98b6f0c619e2d3f841f1b41023af2042d # Parent 511354316db42c5631bddaed82812226f3075fda [svn] Plugin cleanup functionality, via giacomo. diff -r 511354316db4 -r b04ce1c98b6f Plugins/Output/OSS/OSS.c --- a/Plugins/Output/OSS/OSS.c Sat Dec 17 12:09:33 2005 -0800 +++ b/Plugins/Output/OSS/OSS.c Sat Dec 17 12:36:29 2005 -0800 @@ -29,6 +29,7 @@ NULL, NULL, /* Description */ oss_init, + NULL, oss_about, oss_configure, oss_get_volume, diff -r 511354316db4 -r b04ce1c98b6f Plugins/Output/alsa/alsa.c --- a/Plugins/Output/alsa/alsa.c Sat Dec 17 12:09:33 2005 -0800 +++ b/Plugins/Output/alsa/alsa.c Sat Dec 17 12:36:29 2005 -0800 @@ -24,6 +24,7 @@ NULL, NULL, alsa_init, + NULL, alsa_about, alsa_configure, alsa_get_volume, diff -r 511354316db4 -r b04ce1c98b6f Plugins/Output/crossfade/crossfade.c --- a/Plugins/Output/crossfade/crossfade.c Sat Dec 17 12:09:33 2005 -0800 +++ b/Plugins/Output/crossfade/crossfade.c Sat Dec 17 12:36:29 2005 -0800 @@ -75,6 +75,7 @@ NULL, "Crossfade Plugin " VERSION, xfade_init, + NULL, xfade_about, xfade_configure, xfade_get_volume, diff -r 511354316db4 -r b04ce1c98b6f Plugins/Output/disk_writer/disk_writer.c --- a/Plugins/Output/disk_writer/disk_writer.c Sat Dec 17 12:09:33 2005 -0800 +++ b/Plugins/Output/disk_writer/disk_writer.c Sat Dec 17 12:36:29 2005 -0800 @@ -84,6 +84,7 @@ NULL, NULL, /* Description */ disk_init, + NULL, NULL, /* about */ disk_configure, /* configure */ NULL, /* get_volume */ diff -r 511354316db4 -r b04ce1c98b6f Plugins/Output/esd/esd.c --- a/Plugins/Output/esd/esd.c Sat Dec 17 12:09:33 2005 -0800 +++ b/Plugins/Output/esd/esd.c Sat Dec 17 12:36:29 2005 -0800 @@ -26,6 +26,7 @@ NULL, NULL, /* Description */ esdout_init, + NULL, esdout_about, esdout_configure, esdout_get_volume, diff -r 511354316db4 -r b04ce1c98b6f audacious/plugin.h --- a/audacious/plugin.h Sat Dec 17 12:09:33 2005 -0800 +++ b/audacious/plugin.h Sat Dec 17 12:36:29 2005 -0800 @@ -81,6 +81,7 @@ gchar *description; void (*init) (void); + void (*cleanup) (void); void (*about) (void); void (*configure) (void); void (*get_volume) (gint * l, gint * r); diff -r 511354316db4 -r b04ce1c98b6f audacious/pluginenum.c --- a/audacious/pluginenum.c Sat Dec 17 12:09:33 2005 -0800 +++ b/audacious/pluginenum.c Sat Dec 17 12:36:29 2005 -0800 @@ -378,6 +378,12 @@ for (node = get_output_list(); node; node = g_list_next(node)) { op = OUTPUT_PLUGIN(node->data); + if (op && op->cleanup) { + op->cleanup(); + GDK_THREADS_LEAVE(); + while (g_main_iteration(FALSE)); + GDK_THREADS_ENTER(); + } g_module_close(op->handle); }