diff --git a/audacious-plugins-1.5.1-pulseaudio-volume.patch b/audacious-plugins-1.5.1-pulseaudio-volume.patch new file mode 100644 index 0000000..de881d7 --- /dev/null +++ b/audacious-plugins-1.5.1-pulseaudio-volume.patch @@ -0,0 +1,36 @@ +There is no callback feature in Audacious < 2.2 that moves the UI's volume +slider when external volume controls are used. Hence stick to the internal +volume level and don't get confused when trying to save/restore external +volume levels. + +diff -Nur audacious-plugins-1.5.1-orig/src/pulse_audio/pulse_audio.c audacious-plugins-1.5.1/src/pulse_audio/pulse_audio.c +--- audacious-plugins-1.5.1-orig/src/pulse_audio/pulse_audio.c 2008-05-24 00:44:20.000000000 +0200 ++++ audacious-plugins-1.5.1/src/pulse_audio/pulse_audio.c 2009-10-19 16:46:47.527799161 +0200 +@@ -83,6 +83,8 @@ + } + + static void info_cb(struct pa_context *c, const struct pa_sink_input_info *i, int is_last, void *userdata) { ++ return; /* we don't do anything useful with this callback */ ++ + assert(c); + + if (!i) +@@ -685,6 +687,18 @@ + goto unlock_and_fail; + } + ++ pa_operation_unref(o); ++ /* set initial volume */ ++ if (!(o = pa_context_set_sink_input_volume(context, pa_stream_get_index(stream), &volume, NULL, NULL))) { ++ g_warning("pa_context_set_sink_input_volume() failed: %s", pa_strerror(pa_context_errno(context))); ++ goto unlock_and_fail; ++ } ++ while (pa_operation_get_state(o) != PA_OPERATION_DONE) { ++ CHECK_DEAD_GOTO(fail, 1); ++ pa_threaded_mainloop_wait(mainloop); ++ } ++ pa_operation_unref(o); ++ + do_trigger = 0; + written = 0; + time_offset_msec = 0; diff --git a/audacious-plugins.spec b/audacious-plugins.spec index 2f90d44..a0f6123 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -4,7 +4,7 @@ Name: audacious-plugins Version: 1.5.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia @@ -26,6 +26,7 @@ Patch5: audacious-plugins-1.5.1-timidity-cfg.patch Patch6: audacious-plugins-1.5.1-amidi-symbol.patch Patch7: audacious-plugins-1.5.1-neon-reader-error-crash.patch Patch8: audacious-plugins-1.5.1-sndfile-cleanup.patch +Patch9: audacious-plugins-1.5.1-pulseaudio-volume.patch # alsa-ng plugin from 2.1 devel up to 2.2 alpha1 Patch50: audacious-plugins-1.5.1-alsa-ng.patch @@ -177,6 +178,8 @@ vortex compressed files. # pause and seek for libsndfile input plugin %patch8 -p1 -b .sndfile-cleanup +%patch9 -p1 -b .pulseaudio-volume + %patch50 -p1 -b .alsa-ng %patch51 -p1 -b .alsa-ng2 %patch52 -p1 -b .mixer-not-ready @@ -275,6 +278,10 @@ update-desktop-database &> /dev/null || : %changelog +* Mon Oct 19 2009 Michael Schwendt - 1.5.1-12 +- Patch pulseaudio plugin to not get confused by volume values passed + in via callback. + * Sat Sep 19 2009 Michael Schwendt - 1.5.1-11 - Patch alsa-ng plugin with some buffer prefilling to fight underruns. - Merge minor changes from 2.2 alpha1 alsa-ng plugin.