From 0da5b3e5f7e5e53859a9322c533e59b3c4db3b9c Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Dec 17 2009 11:06:05 +0000 Subject: - Patch SID plugin to remove old cruft and fix playback. - Don't drain in pulse_audio output plugin (2.2 doesn't do this anymore either, but does it cause loud clicks'n'pops instead? Test this also with 2.2). --- diff --git a/audacious-plugins-2.1-pulseaudio-no-drain.patch b/audacious-plugins-2.1-pulseaudio-no-drain.patch new file mode 100644 index 0000000..07529cd --- /dev/null +++ b/audacious-plugins-2.1-pulseaudio-no-drain.patch @@ -0,0 +1,12 @@ +diff -Nur audacious-plugins-fedora-2.1-prep/src/pulse_audio/pulse_audio.c audacious-plugins-fedora-2.1/src/pulse_audio/pulse_audio.c +--- audacious-plugins-fedora-2.1-prep/src/pulse_audio/pulse_audio.c 2009-12-16 19:20:21.000000000 +0100 ++++ audacious-plugins-fedora-2.1/src/pulse_audio/pulse_audio.c 2009-12-16 19:21:58.000000000 +0100 +@@ -509,7 +509,7 @@ + + static void pulse_close(void) + { +- drain(); ++ /* drain(); */ + + connected = 0; + diff --git a/audacious-plugins-2.1-sid-playfix.patch b/audacious-plugins-2.1-sid-playfix.patch new file mode 100644 index 0000000..f2c0c19 --- /dev/null +++ b/audacious-plugins-2.1-sid-playfix.patch @@ -0,0 +1,85 @@ +diff -Nur audacious-plugins-fedora-2.1-orig/src/sid/xmms-sid.c audacious-plugins-fedora-2.1-sid/src/sid/xmms-sid.c +--- audacious-plugins-fedora-2.1-orig/src/sid/xmms-sid.c 2009-07-07 00:40:36.000000000 +0200 ++++ audacious-plugins-fedora-2.1-sid/src/sid/xmms-sid.c 2009-12-17 11:56:03.000000000 +0100 +@@ -43,7 +43,6 @@ + */ + xs_status_t xs_status; + XS_MUTEX(xs_status); +-static XS_THREAD_T xs_decode_thread; + + static void xs_get_song_tuple_info(Tuple *pResult, xs_tuneinfo_t *pInfo, gint subTune); + +@@ -74,7 +73,7 @@ + */ + void xs_reinit(void) + { +- XSDEBUG("xs_reinit() thread = %p\n", g_thread_self()); ++ XSDEBUG("xs_reinit()\n"); + + /* Stop playing, if we are */ + XS_MUTEX_LOCK(xs_status); +@@ -247,8 +246,6 @@ + XSDEBUG("load ok\n"); + + /* Set general status information */ +- pb->playing = TRUE; +- xs_status.isPlaying = TRUE; + pb->error = FALSE; + pb->eof = FALSE; + tmpTune = xs_status.tuneInfo; +@@ -261,9 +258,6 @@ + XSDEBUG("subtune #%i selected (#%d wanted), initializing...\n", xs_status.currSong, subTune); + + +- /* We are ready */ +- xs_decode_thread = g_thread_self(); +- XSDEBUG("playing thread = %p\n", xs_decode_thread); + + + /* Allocate audio buffer */ +@@ -315,7 +309,8 @@ + } + + audioOpen = TRUE; +- ++ xs_status.isPlaying = TRUE; ++ pb->playing = TRUE; + pb->set_pb_ready(pb); + + /* Set song information for current subtune */ +@@ -366,16 +361,11 @@ + &xs_status, audioBuffer, XS_AUDIOBUF_SIZE); + } + ++ XS_MUTEX_UNLOCK(xs_status); + /* I <3 visualice/haujobb */ + pb->pass_audio(pb, xs_status.audioFormat, xs_status.audioChannels, + audioGot, audioBuffer, NULL); + +- XS_MUTEX_UNLOCK(xs_status); +- +- /* Wait a little */ +- while (pb->playing && pb->output->buffer_free() < audioGot) +- g_usleep(500); +- + /* Check if we have played enough */ + XS_MUTEX_LOCK(xs_status); + if (xs_cfg.playMaxTimeEnable) { +@@ -428,9 +418,6 @@ + xs_status.isPlaying = FALSE; + pb->eof = TRUE; + XS_MUTEX_UNLOCK(xs_status); +- +- /* Exit the playing thread */ +- XSDEBUG("exiting thread, bye.\n"); + } + + +@@ -457,7 +444,6 @@ + pb->playing = FALSE; + xs_status.isPlaying = FALSE; + XS_MUTEX_UNLOCK(xs_status); +- XS_THREAD_JOIN(xs_decode_thread); + } else { + XS_MUTEX_UNLOCK(xs_status); + } diff --git a/audacious-plugins.spec b/audacious-plugins.spec index b9971d3..07fcb4b 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -5,7 +5,7 @@ Name: audacious-plugins Version: 2.1 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia URL: http://audacious-media-player.org/ @@ -41,6 +41,11 @@ Patch14: audacious-plugins-2.1-sndstretch-dialog.patch Patch15: audacious-plugins-2.1-icecast.patch # merged upstream Patch16: audacious-plugins-2.1-jack.patch +# as in 2.2 +Patch17: audacious-plugins-2.1-pulseaudio-no-drain.patch +# +Patch18: audacious-plugins-2.1-sid-playfix.patch + BuildRequires: audacious-devel >= %{aud_ver} BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel @@ -176,6 +181,8 @@ vortex compressed files. %patch14 -p1 -b .sndstretch-dialog %patch15 -p1 -b .icecast %patch16 -p1 -b .jack +%patch17 -p1 -b .no-drain +%patch18 -p1 -b .sid-playfix sed -i '\,^.SILENT:,d' buildsys.mk.in @@ -259,6 +266,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Dec 16 2009 Michael Schwendt - 2.1-25 +- Patch SID plugin to remove old cruft and fix playback. +- Don't drain in pulse_audio output plugin (2.2 doesn't do this anymore + either, but does it cause loud clicks'n'pops instead? Test this also + with 2.2). + * Mon Nov 30 2009 Michael Schwendt - 2.1-24 - Merge some of the default volume level changes that went into the pulse_audio output plugin in 2.2.