[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 01/01: Update volume on server events such as change of default output device

noreply at xfce.org noreply at xfce.org
Sat Apr 22 15:35:23 CEST 2017


This is an automated email from the git hooks/post-receive script.

andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.

commit 898b00db7e21eb43234b02e9ca1c952f81404528
Author: Kévin Bernard-Allies <kevin.bernard.allies at gmail.com>
Date:   Fri Apr 21 22:39:59 2017 +0200

    Update volume on server events such as change of default output device
---
 panel-plugin/pulseaudio-volume.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/pulseaudio-volume.c b/panel-plugin/pulseaudio-volume.c
index 994e68c..d0fa246 100644
--- a/panel-plugin/pulseaudio-volume.c
+++ b/panel-plugin/pulseaudio-volume.c
@@ -221,6 +221,11 @@ pulseaudio_volume_subscribe_cb (pa_context                   *context,
       pulseaudio_debug ("received source output event");
       break;
 
+    case PA_SUBSCRIPTION_EVENT_SERVER        :
+      pulseaudio_volume_sink_check (volume, context);
+      pulseaudio_debug ("received server event");
+      break;
+
     default                                  :
       pulseaudio_debug ("received unknown pulseaudio event");
       break;
@@ -239,7 +244,7 @@ pulseaudio_volume_context_state_cb (pa_context *context,
   switch (pa_context_get_state (context))
     {
     case PA_CONTEXT_READY        :
-      pa_context_subscribe (context, PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SOURCE | PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, NULL, NULL);
+      pa_context_subscribe (context, PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SOURCE | PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT | PA_SUBSCRIPTION_MASK_SERVER , NULL, NULL);
       pa_context_set_subscribe_callback (context, pulseaudio_volume_subscribe_cb, volume);
 
       pulseaudio_debug ("PulseAudio connection established");

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list