rpms/audacious-plugins/F-12 audacious-plugins-2.1-pulseaudio-volume.patch, 1.1, 1.2 audacious-plugins.spec, 1.71, 1.72

Michael Schwendt mschwendt at fedoraproject.org
Mon Nov 30 13:47:49 UTC 2009


Author: mschwendt

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

Modified Files:
	audacious-plugins-2.1-pulseaudio-volume.patch 
	audacious-plugins.spec 
Log Message:
* Mon Nov 30 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-24
- Merge some of the default volume level changes that went into the
  pulse_audio output plugin in 2.2.
- Fix musepack playback end for alsa-ng plugin.
- Merge jack_free redeclaration fix.


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

Index: audacious-plugins-2.1-pulseaudio-volume.patch
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-12/audacious-plugins-2.1-pulseaudio-volume.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- audacious-plugins-2.1-pulseaudio-volume.patch	21 Oct 2009 20:56:58 -0000	1.1
+++ audacious-plugins-2.1-pulseaudio-volume.patch	30 Nov 2009 13:47:48 -0000	1.2
@@ -1,36 +1,74 @@
 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.
+slider when external volume controls are used. When starting Audacious, the
+Pulse Audio output plugin also doesn't connect to Pulse Audio to find out
+the current volume. Hence stick to the default 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);
++++ audacious-plugins-fedora-2.1-pulseaudio/src/pulse_audio/pulse_audio.c	2009-11-30 14:37:06.000000000 +0100
+@@ -177,7 +177,7 @@
+     pa_cvolume v;
+     int b = 0;
  
-     if (!i)
-@@ -709,6 +711,18 @@
+-    *l = *r = 100;
++    *l = *r = 50;
+ 
+     if (connected) {
+         pa_threaded_mainloop_lock(mainloop);
+@@ -222,6 +222,9 @@
+         pa_threaded_mainloop_lock(mainloop);
+         CHECK_DEAD_GOTO(fail, 1);
+     }
++    /* sanitize output volumes. */
++    l = CLAMP(l, 0, 100);
++    r = CLAMP(r, 0, 100);
+ 
+     if (!volume_valid || volume.channels !=  1) {
+         volume.values[0] = ((pa_volume_t) l * PA_VOLUME_NORM)/100;
+@@ -613,12 +616,6 @@
+     if (!pa_sample_spec_valid(&ss))
+         return FALSE;
+ 
+-    if (!volume_valid) {
+-        pa_cvolume_reset(&volume, ss.channels);
+-        volume_valid = 1;
+-    } else if (volume.channels != ss.channels)
+-        pa_cvolume_set(&volume, ss.channels, pa_cvolume_avg(&volume));
+-
+     if (!(mainloop = pa_threaded_mainloop_new())) {
+         AUDDBG("Failed to allocate main loop");
+         goto fail;
+@@ -661,7 +658,8 @@
+     pa_stream_set_write_callback(stream, stream_request_cb, NULL);
+     pa_stream_set_latency_update_callback(stream, stream_latency_update_cb, NULL);
+ 
+-    if (pa_stream_connect_playback(stream, NULL, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, &volume, NULL) < 0) {
++    /* Connect stream with sink and default volume */
++    if (pa_stream_connect_playback(stream, NULL, NULL, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL) < 0) {
+         AUDDBG("Failed to connect stream: %s", pa_strerror(pa_context_errno(context)));
          goto unlock_and_fail;
      }
+@@ -693,22 +691,6 @@
+ 
+     pa_operation_unref(o);
  
-+    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);
-+
+-    /* Now request the initial stream info */
+-    if (!(o = pa_context_get_sink_input_info(context, pa_stream_get_index(stream), info_cb, NULL))) {
+-        AUDDBG("pa_context_get_sink_input_info() 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);
+-    }
+-
+-    if (!volume_valid) {
+-        AUDDBG("pa_context_get_sink_input_info() failed: %s", pa_strerror(pa_context_errno(context)));
+-        goto unlock_and_fail;
+-    }
+-
      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.71
retrieving revision 1.72
diff -u -p -r1.71 -r1.72
--- audacious-plugins.spec	30 Nov 2009 12:19:12 -0000	1.71
+++ audacious-plugins.spec	30 Nov 2009 13:47:48 -0000	1.72
@@ -5,7 +5,7 @@
 
 Name: audacious-plugins
 Version: 2.1
-Release: 23%{?dist}
+Release: 24%{?dist}
 Summary: Plugins for the Audacious media player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -27,7 +27,6 @@ Patch2: audacious-plugins-2.0.1-xmms-ski
 Patch3: audacious-plugins-2.1-alsa-ng.patch
 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
 Patch9: audacious-plugins-2.1-filewriter-dialogs.patch
@@ -167,7 +166,6 @@ vortex compressed files.
 %patch3 -p1 -b .alsa-ng
 %patch4 -p1 -b .underruns
 %patch5 -p1 -b .pulseaudio-volume
-%patch6 -p1 -b .pulseaudio-volume-accuracy
 %patch7 -p1 -b .modplug
 %patch8 -p1 -b .sndfile-playfix
 %patch9 -p1 -b .filewriter-dialogs
@@ -261,7 +259,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Mon Nov 30 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-23
+* Mon Nov 30 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-24
+- Merge some of the default volume level changes that went into the
+  pulse_audio output plugin in 2.2.
 - Fix musepack playback end for alsa-ng plugin.
 - Merge jack_free redeclaration fix.
 




More information about the fedora-extras-commits mailing list