rpms/audacious-plugins/F-12 audacious-plugins-1.5.1-pulseaudio-volume.patch, NONE, 1.1 audacious-plugins.spec, 1.51, 1.52

Michael Schwendt mschwendt at fedoraproject.org
Mon Oct 19 15:06:17 UTC 2009


Author: mschwendt

Update of /cvs/pkgs/rpms/audacious-plugins/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26086

Modified Files:
	audacious-plugins.spec 
Added Files:
	audacious-plugins-1.5.1-pulseaudio-volume.patch 
Log Message:
* Mon Oct 19 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-5
- Patch pulseaudio plugin to not get confused by volume values passed
  in via callback.


audacious-plugins-1.5.1-pulseaudio-volume.patch:
 pulse_audio.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- NEW FILE audacious-plugins-1.5.1-pulseaudio-volume.patch ---
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;


Index: audacious-plugins.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-12/audacious-plugins.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- audacious-plugins.spec	21 Sep 2009 10:30:06 -0000	1.51
+++ audacious-plugins.spec	19 Oct 2009 15:06:17 -0000	1.52
@@ -5,7 +5,7 @@
 
 Name: audacious-plugins
 Version: 2.1
-Release: 4%{?dist}
+Release: 5%{?dist}
 Summary: Plugins for the Audacious media player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -26,6 +26,7 @@ Patch1: audacious-plugins-1.5.1-timidity
 Patch2: audacious-plugins-2.0.1-xmms-skindir.patch
 Patch3: audacious-plugins-2.1-alsa-ng.patch
 Patch4: audacious-plugins-2.1-underruns.patch
+Patch5: audacious-plugins-1.5.1-pulseaudio-volume.patch
 
 BuildRequires: audacious-devel >= %{aud_ver}
 BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel
@@ -150,6 +151,7 @@ vortex compressed files.
 %patch2 -p1 -b .xmms-skindir
 %patch3 -p1 -b .alsa-ng
 %patch4 -p1 -b .underruns
+%patch5 -p1 -b .pulseaudio-volume
 
 sed -i '\,^.SILENT:,d' buildsys.mk.in
 
@@ -233,6 +235,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Oct 19 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-5
+- Patch pulseaudio plugin to not get confused by volume values passed
+  in via callback.
+
 * Sun Sep 20 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-4
 - Patch alsa-ng plugin with some buffer prefilling to fight underruns.
 - Merge minor changes from 2.2-alpha1 alsa-ng plugin.




More information about the fedora-extras-commits mailing list