diff -ruN uade.orig/src/frontends/audacious/plugin.c uade/src/frontends/audacious/plugin.c --- uade.orig/src/frontends/audacious/plugin.c 2007-07-08 12:47:28.000000000 +0200 +++ uade/src/frontends/audacious/plugin.c 2007-07-24 21:53:20.000000000 +0200 @@ -826,6 +826,11 @@ if (initialize_song(filename) == FALSE) goto err; +#if __AUDACIOUS_PLUGIN_API__ >= 3 + decode_thread = pthread_self(); + uade_thread_running = 1; + play_loop(playhandle); +#else if (pthread_create(&decode_thread, NULL, play_loop, playhandle)) { fprintf(stderr, "uade: can't create play_loop() thread\n"); uade_unalloc_song(uadesong); @@ -834,10 +839,10 @@ uade_unlock(); goto err; } + uade_thread_running = 1; +#endif free(decoded); - - uade_thread_running = 1; return; err: @@ -933,7 +938,11 @@ static int uade_get_time(void) #endif { +#if __AUDACIOUS_PLUGIN_API__ >= 3 + if (abort_playing || last_beat_played || uade_thread_running == 0) +#else if (abort_playing || last_beat_played) +#endif return -1; if (gui_info_set == 0 && uadesong->max_subsong != -1) {