diff -ruN xmms-crossfade-0.3.12-audplugin2/crossfade.c xmms-crossfade-0.3.12-audplugin3/crossfade.c --- xmms-crossfade-0.3.12-audplugin2/crossfade.c 2007-09-08 15:03:29.000000000 +0200 +++ xmms-crossfade-0.3.12-audplugin3/crossfade.c 2007-09-08 15:17:35.000000000 +0200 @@ -96,6 +96,31 @@ OutputPlugin xfade_op; void (*cleanup) (void); } +#if defined(COMPILE_FOR_AUDACIOUS) +xfade_op_private = +{ + { + .description = "Crossfade Plugin " VERSION, + .init = xfade_init, + .get_volume = xfade_get_volume, + .set_volume = xfade_set_volume, + .open_audio = xfade_open_audio, + .write_audio = xfade_write_audio, + .close_audio = xfade_close_audio, + .flush = xfade_flush, + .pause = xfade_pause, + .buffer_free = xfade_buffer_free, + .buffer_playing = xfade_buffer_playing, + .output_time = xfade_output_time, + .written_time = xfade_written_time, +#if defined(HAVE_GTK) + .about = xfade_about, + .configure = xfade_configure, +#endif + }, + NULL +}; +#else xfade_op_private = { { @@ -103,9 +128,6 @@ NULL, "Crossfade Plugin " VERSION, xfade_init, -#if defined(COMPILE_FOR_AUDACIOUS) - xfade_cleanup, -#endif #if defined(HAVE_GTK) xfade_about, xfade_configure, @@ -124,21 +146,16 @@ xfade_buffer_playing, xfade_output_time, xfade_written_time, -#if defined(COMPILE_FOR_AUDACIOUS) - NULL - }, - NULL -#else }, xfade_cleanup -#endif }; +#endif static OutputPlugin *xfade_op = &xfade_op_private.xfade_op; #if __AUDACIOUS_PLUGIN_API__ >= 2 OutputPlugin *xfade_oplist[] = { &xfade_op_private.xfade_op, NULL }; -DECLARE_PLUGIN(crossfade, NULL, NULL, NULL, xfade_oplist, NULL, NULL, NULL); +SIMPLE_OUTPUT_PLUGIN(crossfade, xfade_oplist); #endif /* internal prototypes */ diff -ruN xmms-crossfade-0.3.12-audplugin2/oss.c xmms-crossfade-0.3.12-audplugin3/oss.c --- xmms-crossfade-0.3.12-audplugin2/oss.c 2007-09-08 15:27:54.000000000 +0200 +++ xmms-crossfade-0.3.12-audplugin3/oss.c 2007-09-08 15:27:08.000000000 +0200 @@ -62,14 +62,27 @@ static gint oss_written_time(); /* output plugin callback table */ +#if defined (COMPILE_FOR_AUDACIOUS) +static OutputPlugin oss_op = { + .description = "Builtin OSS Driver", + .get_volume = oss_get_volume, + .set_volume = oss_set_volume, + .open_audio = oss_open_audio, + .write_audio = oss_write_audio, + .close_audio = oss_close_audio, + .flush = oss_flush, + .pause = oss_pause, + .buffer_free = oss_buffer_free, + .buffer_playing = oss_buffer_playing, + .output_time = oss_output_time, + .written_time = oss_written_time, +}; +#else static OutputPlugin oss_op = { NULL, NULL, "Builtin OSS Driver", NULL, -#if defined (COMPILE_FOR_AUDACIOUS) - NULL, -#endif NULL, NULL, oss_get_volume, @@ -83,10 +96,8 @@ oss_buffer_playing, oss_output_time, oss_written_time, -#if defined(COMPILE_FOR_AUDACIOUS) - NULL, -#endif }; +#endif /* local prototypes */ static void *buffer_thread_f(void *arg);