rpms/audacious-plugins/devel audacious-plugins-2.1-pulseaudio-volume-accuracy.patch, NONE, 1.1 audacious-plugins-2.1-pulseaudio-volume.patch, NONE, 1.1 audacious-plugins.spec, 1.52, 1.53 audacious-plugins-1.5.1-pulseaudio-volume.patch, 1.1, NONE

Michael Schwendt mschwendt at fedoraproject.org
Wed Oct 21 20:58:19 UTC 2009


Author: mschwendt

Update of /cvs/pkgs/rpms/audacious-plugins/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25119

Modified Files:
	audacious-plugins.spec 
Added Files:
	audacious-plugins-2.1-pulseaudio-volume-accuracy.patch 
	audacious-plugins-2.1-pulseaudio-volume.patch 
Removed Files:
	audacious-plugins-1.5.1-pulseaudio-volume.patch 
Log Message:
sync with F-12

audacious-plugins-2.1-pulseaudio-volume-accuracy.patch:
 pulse_audio.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- NEW FILE audacious-plugins-2.1-pulseaudio-volume-accuracy.patch ---
diff -Nur audacious-plugins-fedora-2.1-pulseaudio/src/pulse_audio/pulse_audio.c audacious-plugins-fedora-2.1-pulseaudio-volume-accuracy/src/pulse_audio/pulse_audio.c
--- audacious-plugins-fedora-2.1-pulseaudio/src/pulse_audio/pulse_audio.c	2009-10-21 22:44:06.149809732 +0200
+++ audacious-plugins-fedora-2.1-pulseaudio-volume-accuracy/src/pulse_audio/pulse_audio.c	2009-10-21 22:45:28.048813828 +0200
@@ -38,6 +38,7 @@
 
 static pa_cvolume volume;
 static int volume_valid = 0;
+static int save_volume_l = 0, save_volume_r = 0;
 
 static int do_trigger = 0;
 static uint64_t written = 0;
@@ -197,8 +198,8 @@
 
     if (b) {
         if (v.channels == 2) {
-            *l = (int) ((v.values[0]*100)/PA_VOLUME_NORM);
-            *r = (int) ((v.values[1]*100)/PA_VOLUME_NORM);
+            *l = save_volume_l;
+            *r = save_volume_r;
         } else
             *l = *r = (int) ((pa_cvolume_avg(&v)*100)/PA_VOLUME_NORM);
     }
@@ -219,6 +220,8 @@
 }
 
 static void pulse_set_volume(int l, int r) {
+    save_volume_l = l;
+    save_volume_r = r;
 
     if (connected) {
         pa_threaded_mainloop_lock(mainloop);

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

--- NEW FILE audacious-plugins-2.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-fedora-2.1-orig/src/pulse_audio/pulse_audio.c audacious-plugins-fedora-2.1-pulseaudio/src/pulse_audio/pulse_audio.c
--- audacious-plugins-fedora-2.1-orig/src/pulse_audio/pulse_audio.c	2009-07-07 00:40:36.000000000 +0200
+++ audacious-plugins-fedora-2.1-pulseaudio/src/pulse_audio/pulse_audio.c	2009-10-21 22:44:06.149809732 +0200
@@ -80,6 +80,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)
@@ -709,6 +711,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/devel/audacious-plugins.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -p -r1.52 -r1.53
--- audacious-plugins.spec	21 Oct 2009 11:30:07 -0000	1.52
+++ audacious-plugins.spec	21 Oct 2009 20:58:19 -0000	1.53
@@ -5,7 +5,7 @@
 
 Name: audacious-plugins
 Version: 2.1
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary: Plugins for the Audacious media player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -26,7 +26,8 @@ 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
+Patch5: audacious-plugins-2.1-pulseaudio-volume.patch
+Patch6: audacious-plugins-2.1-pulseaudio-volume-accuracy.patch
 
 BuildRequires: audacious-devel >= %{aud_ver}
 BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel
@@ -152,6 +153,7 @@ vortex compressed files.
 %patch3 -p1 -b .alsa-ng
 %patch4 -p1 -b .underruns
 %patch5 -p1 -b .pulseaudio-volume
+%patch6 -p1 -b .pulseaudio-volume-accuracy
 
 sed -i '\,^.SILENT:,d' buildsys.mk.in
 
@@ -235,6 +237,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Oct 21 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-7
+- Patch pulseaudio plugin to not suffer from precision loss when
+  calculating the volume level to save.
+
 * Wed Oct 21 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-6
 - Rediff the underruns patch and set buffer_time_min.
 


--- audacious-plugins-1.5.1-pulseaudio-volume.patch DELETED ---




More information about the fedora-extras-commits mailing list