diff -ruN xmms-crossfade-0.3.12.orig/crossfade.c xmms-crossfade-0.3.12/crossfade.c --- xmms-crossfade-0.3.12.orig/crossfade.c 2007-03-04 21:57:16.000000000 +0100 +++ xmms-crossfade-0.3.12/crossfade.c 2007-05-28 02:27:26.000000000 +0200 @@ -136,6 +136,10 @@ 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); +#endif /* internal prototypes */ static void load_symbols(); @@ -181,7 +185,9 @@ #endif /* local variables */ +#if __AUDACIOUS_PLUGIN_API__ < 2 static gint session_id; +#endif static gboolean realtime; static gboolean is_http; @@ -585,7 +591,9 @@ DEBUG(("[crossfade] init: could not find any output!\n")); /* get xmms controlsocket session id */ +#if __AUDACIOUS_PLUGIN_API__ < 2 session_id = ctrlsocket_get_session_id(); +#endif /* load any dynamic linked symbols */ load_symbols(); @@ -1137,6 +1145,12 @@ DEBUG(("[crossfade] open_audio: WARNING: already opened!\n")); /* get filename */ +#if __AUDACIOUS_PLUGIN_API__ >= 2 + pos = audacious_drct_pl_get_pos (); + file = audacious_drct_pl_get_file (pos); + title = audacious_drct_pl_get_title(pos); + comment = NULL; +#else #ifdef HAVE_PLAYLIST_GET_FILENAME pos = get_playlist_position(); /* XMMS */ file = playlist_get_filename(pos); /* XMMS */ @@ -1148,6 +1162,7 @@ title = xmms_remote_get_playlist_title(session_id, pos); comment = NULL; #endif +#endif DEBUG(("[crossfade] open_audio: bname=\"%s\"\n", g_basename(file))); DEBUG(("[crossfade] open_audio: title=\"%s\"\n", title)); @@ -2499,6 +2514,10 @@ DEBUG(("[crossfade] flush: time=%d\n", time)); /* get filename */ +#if __AUDACIOUS_PLUGIN_API__ >= 2 + pos = audacious_drct_pl_get_pos(); + file = audacious_drct_pl_get_file(pos); +#else #ifdef HAVE_PLAYLIST_GET_FILENAME pos = get_playlist_position(); /* XMMS */ file = playlist_get_filename(pos); /* XMMS */ @@ -2506,6 +2525,7 @@ pos = xmms_remote_get_playlist_pos (session_id); file = xmms_remote_get_playlist_file (session_id, pos); #endif +#endif #if defined(COMPILE_FOR_AUDACIOUS) /* HACK: special handling for audacious, which only calls flush(0) on a songchange */ diff -ruN xmms-crossfade-0.3.12.orig/crossfade.h xmms-crossfade-0.3.12/crossfade.h --- xmms-crossfade-0.3.12.orig/crossfade.h 2007-03-04 21:57:16.000000000 +0100 +++ xmms-crossfade-0.3.12/crossfade.h 2007-05-28 02:27:29.000000000 +0200 @@ -45,7 +45,11 @@ #endif #if defined(COMPILE_FOR_AUDACIOUS) # include +#if __AUDACIOUS_PLUGIN_API__ >= 2 +# include +#else # include +#endif # include # include #endif @@ -352,7 +356,9 @@ /* get plugin info (imported by XMMS) */ +#if __AUDACIOUS_PLUGIN_API__ >= 2 OutputPlugin *get_oplugin_info(); +#endif OutputPlugin *get_crossfade_oplugin_info(); /* xmms internal prototypes */ diff -ruN xmms-crossfade-0.3.12.orig/export.sym xmms-crossfade-0.3.12/export.sym --- xmms-crossfade-0.3.12.orig/export.sym 2006-07-05 16:10:40.000000000 +0200 +++ xmms-crossfade-0.3.12/export.sym 2007-05-28 02:27:19.000000000 +0200 @@ -1 +1,2 @@ get_oplugin_info +get_plugin_info