diff --git a/audacious-plugins-2.1-sndfile-playfix.patch b/audacious-plugins-2.1-sndfile-playfix.patch new file mode 100644 index 0000000..66e1518 --- /dev/null +++ b/audacious-plugins-2.1-sndfile-playfix.patch @@ -0,0 +1,59 @@ +diff -Nur audacious-plugins-fedora-2.1-orig/src/sndfile/plugin.c audacious-plugins-fedora-2.1-sndfile/src/sndfile/plugin.c +--- audacious-plugins-fedora-2.1-orig/src/sndfile/plugin.c 2009-07-07 00:40:36.000000000 +0200 ++++ audacious-plugins-fedora-2.1-sndfile/src/sndfile/plugin.c 2009-10-29 13:09:20.444864401 +0100 +@@ -49,7 +49,6 @@ + static glong seek_time = -1; + static volatile char pause_flag; + +-static GThread *decode_thread; + static GMutex *decode_mutex; + static GCond *decode_cond; + +@@ -395,17 +394,8 @@ + samples = sf_read_short (sndfile, buffer, BUFFER_SIZE); + + if (samples > 0 && playback->playing == TRUE) { +- while ((playback->output->buffer_free () < samples) && +- playback->playing == TRUE) { +- g_get_current_time(&sleeptime); +- g_time_val_add(&sleeptime, 500000); +- g_mutex_lock(decode_mutex); +- g_cond_timed_wait(decode_cond, decode_mutex, &sleeptime); +- g_mutex_unlock(decode_mutex); +- + if (playback->playing == FALSE) + break; +- } + + playback->pass_audio(playback, FMT_S16_NE, sfinfo.channels, + samples * sizeof(buffer[0]), buffer, &playback->playing); +@@ -482,9 +472,9 @@ + + playback->playing = TRUE; + +- decode_thread = g_thread_self(); + playback->set_pb_ready(playback); + play_loop(playback); ++ playback->playing = FALSE; + } + + static void +@@ -496,18 +486,12 @@ + static void + play_stop (InputPlayback *playback) + { +- if (decode_thread == NULL) +- return; +- + g_mutex_lock(decode_mutex); + playback->playing = FALSE; + g_mutex_unlock(decode_mutex); + g_cond_signal(decode_cond); + +- g_thread_join (decode_thread); +- + sndfile = NULL; +- decode_thread = NULL; + seek_time = -1; + } + diff --git a/audacious-plugins.spec b/audacious-plugins.spec index a46f3fc..6d1ec87 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -5,7 +5,7 @@ Name: audacious-plugins Version: 2.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia URL: http://audacious-media-player.org/ @@ -29,6 +29,7 @@ Patch4: audacious-plugins-2.1-underruns.patch Patch5: audacious-plugins-2.1-pulseaudio-volume.patch Patch6: audacious-plugins-2.1-pulseaudio-volume-accuracy.patch Patch7: audacious-plugins-2.1-modplug.patch +Patch8: audacious-plugins-2.1-sndfile-playfix.patch BuildRequires: audacious-devel >= %{aud_ver} BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel @@ -156,6 +157,7 @@ vortex compressed files. %patch5 -p1 -b .pulseaudio-volume %patch6 -p1 -b .pulseaudio-volume-accuracy %patch7 -p1 -b .modplug +%patch8 -p1 -b .sndfile-playfix sed -i '\,^.SILENT:,d' buildsys.mk.in @@ -239,6 +241,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 29 2009 Michael Schwendt - 2.1-10 +- Remove decode_thread from sndfile plugin to fix playback. + * Mon Oct 26 2009 Michael Schwendt - 2.1-9 - Let buffer_time_min in underruns patch depend on default buffer size.