Merge lp:~equinox-i/xfce4-volumed-pulse/add-support-for-mic-mute into lp:~mrpouit/xfce4-volumed-pulse/master

Proposed by Christian Pointner
Status: Needs review
Proposed branch: lp:~equinox-i/xfce4-volumed-pulse/add-support-for-mic-mute
Merge into: lp:~mrpouit/xfce4-volumed-pulse/master
Diff against target: 562 lines (+352/-6)
7 files modified
src/main.c (+2/-0)
src/xvd_data_types.h (+3/-0)
src/xvd_keys.c (+47/-2)
src/xvd_notify.c (+36/-0)
src/xvd_notify.h (+5/-0)
src/xvd_pulse.c (+254/-4)
src/xvd_pulse.h (+5/-0)
To merge this branch: bzr merge lp:~equinox-i/xfce4-volumed-pulse/add-support-for-mic-mute
Reviewer Review Type Date Requested Status
Simon Steinbeiß (community) Approve
Lionel Le Folgoc Pending
Review via email: mp+270876@code.launchpad.net

Commit message

Addes support for MicMute Key

Description of the change

This adds support for the MicMute Key on modern Laptops..

To post a comment you must log in.
64. By Christian Pointner

use icon for microphone mute status

Revision history for this message
Simon Steinbeiß (ochosi) wrote :

Thanks for your work! Please note that xfce4-volumed-pulse is now maintained at https://git.xfce.org/apps/xfce4-volumed-pulse.

Your patch has been reviewed and merged there.

Revision history for this message
Simon Steinbeiß (ochosi) :
review: Approve

Unmerged revisions

64. By Christian Pointner

use icon for microphone mute status

63. By Christian Pointner

Addes support for MicMute Key

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/main.c'
--- src/main.c 2013-03-10 18:28:11 +0000
+++ src/main.c 2016-02-02 19:54:56 +0000
@@ -101,11 +101,13 @@
101 i->pa_main_loop = NULL;101 i->pa_main_loop = NULL;
102 i->pulse_context = NULL;102 i->pulse_context = NULL;
103 i->sink_index = -1;103 i->sink_index = -1;
104 i->source_index = -1;
104 i->chan = NULL;105 i->chan = NULL;
105 i->loop = NULL;106 i->loop = NULL;
106 #ifdef HAVE_LIBNOTIFY107 #ifdef HAVE_LIBNOTIFY
107 i->gauge_notifications = FALSE;108 i->gauge_notifications = FALSE;
108 i->notification = NULL;109 i->notification = NULL;
110 i->notification_mic = NULL;
109 #endif111 #endif
110}112}
111113
112114
=== modified file 'src/xvd_data_types.h'
--- src/xvd_data_types.h 2013-03-10 18:28:11 +0000
+++ src/xvd_data_types.h 2016-02-02 19:54:56 +0000
@@ -55,8 +55,10 @@
55 pa_glib_mainloop *pa_main_loop;55 pa_glib_mainloop *pa_main_loop;
56 pa_context *pulse_context;56 pa_context *pulse_context;
57 guint32 sink_index;57 guint32 sink_index;
58 guint32 source_index;
58 pa_cvolume volume;59 pa_cvolume volume;
59 int mute;60 int mute;
61 int mic_mute;
60 62
61 /* Xfconf vars */63 /* Xfconf vars */
62 XfconfChannel *chan;64 XfconfChannel *chan;
@@ -66,6 +68,7 @@
66 /* Libnotify vars */68 /* Libnotify vars */
67 gboolean gauge_notifications;69 gboolean gauge_notifications;
68 NotifyNotification* notification;70 NotifyNotification* notification;
71 NotifyNotification* notification_mic;
69 #endif72 #endif
7073
71 /* Other Xvd vars */74 /* Other Xvd vars */
7275
=== modified file 'src/xvd_keys.c'
--- src/xvd_keys.c 2013-03-10 18:28:11 +0000
+++ src/xvd_keys.c 2016-02-02 19:54:56 +0000
@@ -55,11 +55,21 @@
55{55{
56 XvdInstance *xvd_inst = (XvdInstance *) Inst;56 XvdInstance *xvd_inst = (XvdInstance *) Inst;
57 57
58 g_debug ("The LowerVolume key was pressed.");58 g_debug ("The Mute key was pressed.");
59 59
60 xvd_toggle_mute (xvd_inst);60 xvd_toggle_mute (xvd_inst);
61}61}
6262
63static
64void xvd_mic_mute_handler (const char *keystring, void *Inst)
65{
66 XvdInstance *xvd_inst = (XvdInstance *) Inst;
67
68 g_debug ("The MicMute key was pressed.");
69
70 xvd_toggle_mic_mute (xvd_inst);
71}
72
63void73void
64xvd_keys_init(XvdInstance *Inst)74xvd_keys_init(XvdInstance *Inst)
65{75{
@@ -117,6 +127,24 @@
117 keybinder_bind ("<Ctrl><Alt><Super>XF86AudioMute", xvd_mute_handler, Inst);127 keybinder_bind ("<Ctrl><Alt><Super>XF86AudioMute", xvd_mute_handler, Inst);
118 keybinder_bind ("<Shift><Alt><Super>XF86AudioMute", xvd_mute_handler, Inst);128 keybinder_bind ("<Shift><Alt><Super>XF86AudioMute", xvd_mute_handler, Inst);
119 keybinder_bind ("<Ctrl><Shift><Alt><Super>XF86AudioMute", xvd_mute_handler, Inst);129 keybinder_bind ("<Ctrl><Shift><Alt><Super>XF86AudioMute", xvd_mute_handler, Inst);
130
131
132 keybinder_bind ("XF86AudioMicMute", xvd_mic_mute_handler, Inst);
133 keybinder_bind ("<Ctrl>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
134 keybinder_bind ("<Alt>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
135 keybinder_bind ("<Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
136 keybinder_bind ("<Shift>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
137 keybinder_bind ("<Ctrl><Shift>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
138 keybinder_bind ("<Ctrl><Alt>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
139 keybinder_bind ("<Ctrl><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
140 keybinder_bind ("<Alt><Shift>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
141 keybinder_bind ("<Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
142 keybinder_bind ("<Shift><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
143 keybinder_bind ("<Ctrl><Shift><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
144 keybinder_bind ("<Ctrl><Shift><Alt>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
145 keybinder_bind ("<Ctrl><Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
146 keybinder_bind ("<Shift><Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
147 keybinder_bind ("<Ctrl><Shift><Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler, Inst);
120}148}
121149
122void150void
@@ -175,5 +203,22 @@
175 keybinder_unbind ("<Ctrl><Alt><Super>XF86AudioMute", xvd_mute_handler);203 keybinder_unbind ("<Ctrl><Alt><Super>XF86AudioMute", xvd_mute_handler);
176 keybinder_unbind ("<Shift><Alt><Super>XF86AudioMute", xvd_mute_handler);204 keybinder_unbind ("<Shift><Alt><Super>XF86AudioMute", xvd_mute_handler);
177 keybinder_unbind ("<Ctrl><Shift><Alt><Super>XF86AudioMute", xvd_mute_handler);205 keybinder_unbind ("<Ctrl><Shift><Alt><Super>XF86AudioMute", xvd_mute_handler);
178206
207
208 keybinder_unbind ("XF86AudioMicMute", xvd_mic_mute_handler);
209 keybinder_unbind ("<Ctrl>XF86AudioMicMute", xvd_mic_mute_handler);
210 keybinder_unbind ("<Alt>XF86AudioMicMute", xvd_mic_mute_handler);
211 keybinder_unbind ("<Super>XF86AudioMicMute", xvd_mic_mute_handler);
212 keybinder_unbind ("<Shift>XF86AudioMicMute", xvd_mic_mute_handler);
213 keybinder_unbind ("<Ctrl><Shift>XF86AudioMicMute", xvd_mic_mute_handler);
214 keybinder_unbind ("<Ctrl><Alt>XF86AudioMicMute", xvd_mic_mute_handler);
215 keybinder_unbind ("<Ctrl><Super>XF86AudioMicMute", xvd_mic_mute_handler);
216 keybinder_unbind ("<Alt><Shift>XF86AudioMicMute", xvd_mic_mute_handler);
217 keybinder_unbind ("<Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler);
218 keybinder_unbind ("<Shift><Super>XF86AudioMicMute", xvd_mic_mute_handler);
219 keybinder_unbind ("<Ctrl><Shift><Super>XF86AudioMicMute", xvd_mic_mute_handler);
220 keybinder_unbind ("<Ctrl><Shift><Alt>XF86AudioMicMute", xvd_mic_mute_handler);
221 keybinder_unbind ("<Ctrl><Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler);
222 keybinder_unbind ("<Shift><Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler);
223 keybinder_unbind ("<Ctrl><Shift><Alt><Super>XF86AudioMicMute", xvd_mic_mute_handler);
179}224}
180225
=== modified file 'src/xvd_notify.c'
--- src/xvd_notify.c 2013-03-10 18:28:11 +0000
+++ src/xvd_notify.c 2016-02-02 19:54:56 +0000
@@ -99,6 +99,37 @@
99 (Inst->gauge_notifications) ? -1 : 0);99 (Inst->gauge_notifications) ? -1 : 0);
100}100}
101101
102void
103xvd_notify_mic_notification(XvdInstance *Inst)
104{
105 GError* error = NULL;
106 gchar* title = NULL;
107 gchar* icon = NULL;
108
109 title = g_strdup_printf ("Microphone is %s", (Inst->mic_mute) ? "muted" : "active");
110 icon = (Inst->mic_mute) ? "microphone-sensitivity-muted" : "microphone-sensitivity-high";
111
112 notify_notification_update (Inst->notification_mic,
113 title,
114 NULL,
115 icon);
116
117 g_free (title);
118
119 if (Inst->gauge_notifications) {
120 notify_notification_set_hint_int32 (Inst->notification_mic,
121 LAYOUT_ICON_ONLY,
122 1);
123 }
124
125 if (!notify_notification_show (Inst->notification_mic, &error))
126 {
127 g_warning ("Error while sending mic notification : %s\n", error->message);
128 g_error_free (error);
129 }
130
131}
132
102void 133void
103xvd_notify_init(XvdInstance *Inst, 134xvd_notify_init(XvdInstance *Inst,
104 const gchar *appname)135 const gchar *appname)
@@ -128,11 +159,14 @@
128#ifdef NOTIFY_CHECK_VERSION159#ifdef NOTIFY_CHECK_VERSION
129#if NOTIFY_CHECK_VERSION (0, 7, 0)160#if NOTIFY_CHECK_VERSION (0, 7, 0)
130 Inst->notification = notify_notification_new ("Xfce4-Volumed", NULL, NULL);161 Inst->notification = notify_notification_new ("Xfce4-Volumed", NULL, NULL);
162 Inst->notification_mic = notify_notification_new ("Xfce4-Volumed", NULL, NULL);
131#else163#else
132 Inst->notification = notify_notification_new ("Xfce4-Volumed", NULL, NULL, NULL);164 Inst->notification = notify_notification_new ("Xfce4-Volumed", NULL, NULL, NULL);
165 Inst->notification_mic = notify_notification_new ("Xfce4-Volumed", NULL, NULL, NULL);
133#endif166#endif
134#else167#else
135 Inst->notification = notify_notification_new ("Xfce4-Volumed", NULL, NULL, NULL);168 Inst->notification = notify_notification_new ("Xfce4-Volumed", NULL, NULL, NULL);
169 Inst->notification_mic = notify_notification_new ("Xfce4-Volumed", NULL, NULL, NULL);
136#endif170#endif
137}171}
138172
@@ -141,5 +175,7 @@
141{175{
142 g_object_unref (G_OBJECT (Inst->notification));176 g_object_unref (G_OBJECT (Inst->notification));
143 Inst->notification = NULL;177 Inst->notification = NULL;
178 g_object_unref (G_OBJECT (Inst->notification_mic));
179 Inst->notification_mic = NULL;
144 notify_uninit ();180 notify_uninit ();
145}181}
146182
=== modified file 'src/xvd_notify.h'
--- src/xvd_notify.h 2013-03-10 18:28:11 +0000
+++ src/xvd_notify.h 2016-02-02 19:54:56 +0000
@@ -46,6 +46,11 @@
46void46void
47xvd_notify_undershoot_notification(XvdInstance *Inst);47xvd_notify_undershoot_notification(XvdInstance *Inst);
4848
49
50void
51xvd_notify_mic_notification(XvdInstance *Inst);
52
53
49void 54void
50xvd_notify_init(XvdInstance *Inst, 55xvd_notify_init(XvdInstance *Inst,
51 const gchar *appname);56 const gchar *appname);
5257
=== modified file 'src/xvd_pulse.c'
--- src/xvd_pulse.c 2012-05-26 13:41:02 +0000
+++ src/xvd_pulse.c 2016-02-02 19:54:56 +0000
@@ -39,14 +39,20 @@
3939
40static pa_cvolume old_volume;40static pa_cvolume old_volume;
41static int old_mute;41static int old_mute;
42static int old_mic_mute;
4243
4344
44#ifdef HAVE_LIBNOTIFY45#ifdef HAVE_LIBNOTIFY
45static void xvd_notify_volume_callback (pa_context *c,46static void xvd_notify_volume_callback (pa_context *c,
46 int success,47 int success,
47 void *userdata);48 void *userdata);
49
50static void xvd_notify_mic_callback (pa_context *c,
51 int success,
52 void *userdata);
48#else53#else
49#define xvd_notify_volume_callback NULL54#define xvd_notify_volume_callback NULL
55#define xvd_notify_mic_callback NULL
50#endif56#endif
5157
52static void xvd_context_state_callback (pa_context *c,58static void xvd_context_state_callback (pa_context *c,
@@ -76,6 +82,21 @@
76 int eol,82 int eol,
77 void *userdata);83 void *userdata);
7884
85static void xvd_default_source_info_callback (pa_context *c,
86 const pa_source_info *info,
87 int eol,
88 void *userdata);
89
90static void xvd_source_info_callback (pa_context *c,
91 const pa_source_info *source,
92 int eol,
93 void *userdata);
94
95static void xvd_update_source_callback (pa_context *c,
96 const pa_source_info *info,
97 int eol,
98 void *userdata);
99
79static gboolean xvd_connect_to_pulse (XvdInstance *i);100static gboolean xvd_connect_to_pulse (XvdInstance *i);
80101
81102
@@ -201,6 +222,47 @@
201}222}
202223
203224
225void
226xvd_toggle_mic_mute (XvdInstance *i)
227{
228 pa_operation *op = NULL;
229
230 if (!i || !i->pulse_context)
231 {
232 g_warning ("xvd_toggle_mic_mute: pulseaudio context is null");
233 return;
234 }
235
236 if (pa_context_get_state (i->pulse_context) != PA_CONTEXT_READY)
237 {
238 g_warning ("xvd_toggle_mic_mute: pulseaudio context isn't ready");
239 return;
240 }
241
242 if (i->source_index == PA_INVALID_INDEX)
243 {
244 g_warning ("xvd_toggle_mic_mute: undefined source");
245 return;
246 }
247
248 /* backup existing mute and update */
249 i->mic_mute = !(old_mic_mute = i->mic_mute);
250
251 op = pa_context_set_source_mute_by_index (i->pulse_context,
252 i->source_index,
253 i->mic_mute,
254 xvd_notify_mic_callback,
255 i);
256
257 if (!op)
258 {
259 g_warning ("xvd_toggle_mic_mute: failed");
260 return;
261 }
262 pa_operation_unref (op);
263}
264
265
204gint266gint
205xvd_get_readable_volume (const pa_cvolume *vol)267xvd_get_readable_volume (const pa_cvolume *vol)
206{268{
@@ -259,13 +321,13 @@
259321
260 if (!c || !userdata)322 if (!c || !userdata)
261 {323 {
262 g_warning ("xvd_notify_volume_update: invalid argument");324 g_warning ("xvd_notify_volume_callback: invalid argument");
263 return;325 return;
264 }326 }
265327
266 if (!success)328 if (!success)
267 {329 {
268 g_warning ("xvd_notify_volume_update: operation failed, %s",330 g_warning ("xvd_notify_volume_callback: operation failed, %s",
269 pa_strerror (pa_context_errno (c)));331 pa_strerror (pa_context_errno (c)));
270 return;332 return;
271 }333 }
@@ -290,6 +352,39 @@
290 else352 else
291 xvd_notify_volume_notification (i);353 xvd_notify_volume_notification (i);
292}354}
355
356
357/**
358 * Shows Mic mute status notification
359 */
360static void
361xvd_notify_mic_callback (pa_context *c,
362 int success,
363 void *userdata)
364{
365 XvdInstance *i = (XvdInstance *) userdata;
366 guint32 r_oldv, r_curv;
367
368 if (!c || !userdata)
369 {
370 g_warning ("xvd_notify_mic_callback: invalid argument");
371 return;
372 }
373
374 if (!success)
375 {
376 g_warning ("xvd_notify_mic_callback: operation failed, %s",
377 pa_strerror (pa_context_errno (c)));
378 return;
379 }
380
381 /* the sink was (un)muted */
382 if (old_mic_mute != i->mic_mute)
383 {
384 xvd_notify_mic_notification (i);
385 return;
386 }
387}
293#endif388#endif
294389
295390
@@ -335,6 +430,28 @@
335 pa_operation_unref (op);430 pa_operation_unref (op);
336 }431 }
337 break;432 break;
433 /* change on a source, re-fetch it */
434 case PA_SUBSCRIPTION_EVENT_SOURCE:
435 if (i->source_index != index)
436 return;
437
438 if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE)
439 i->source_index = PA_INVALID_INDEX;
440 else
441 {
442 op = pa_context_get_source_info_by_index (c,
443 index,
444 xvd_update_source_callback,
445 userdata);
446
447 if (!op)
448 {
449 g_warning ("xvd_subscribed_events_callback: failed to get source info");
450 return;
451 }
452 pa_operation_unref (op);
453 }
454 break;
338 /* change on the server, re-fetch everything */455 /* change on the server, re-fetch everything */
339 case PA_SUBSCRIPTION_EVENT_SERVER:456 case PA_SUBSCRIPTION_EVENT_SERVER:
340 op = pa_context_get_server_info (c,457 op = pa_context_get_server_info (c,
@@ -360,7 +477,7 @@
360 void *userdata)477 void *userdata)
361{478{
362 XvdInstance *i = (XvdInstance *) userdata;479 XvdInstance *i = (XvdInstance *) userdata;
363 pa_subscription_mask_t mask = PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SERVER;480 pa_subscription_mask_t mask = PA_SUBSCRIPTION_MASK_SINK | PA_SUBSCRIPTION_MASK_SOURCE | PA_SUBSCRIPTION_MASK_SERVER;
364 pa_operation *op = NULL;481 pa_operation *op = NULL;
365482
366 if (!c || !userdata)483 if (!c || !userdata)
@@ -390,6 +507,7 @@
390 case PA_CONTEXT_FAILED:507 case PA_CONTEXT_FAILED:
391 g_critical("xvd_context_state_callback: The connection failed or was disconnected, is PulseAudio Daemon running?");508 g_critical("xvd_context_state_callback: The connection failed or was disconnected, is PulseAudio Daemon running?");
392 i->sink_index = PA_INVALID_INDEX;509 i->sink_index = PA_INVALID_INDEX;
510 i->source_index = PA_INVALID_INDEX;
393 break;511 break;
394 case PA_CONTEXT_READY:512 case PA_CONTEXT_READY:
395 g_debug ("xvd_context_state_callback: The connection is established, the context is ready to execute operations");513 g_debug ("xvd_context_state_callback: The connection is established, the context is ready to execute operations");
@@ -397,7 +515,7 @@
397 xvd_subscribed_events_callback,515 xvd_subscribed_events_callback,
398 userdata);516 userdata);
399517
400 /* subscribe to sink and server changes, we don't need more */518 /* subscribe to sink/source and server changes, we don't need more */
401 op = pa_context_subscribe (c,519 op = pa_context_subscribe (c,
402 mask,520 mask,
403 NULL,521 NULL,
@@ -476,6 +594,36 @@
476 }594 }
477 pa_operation_unref (op);595 pa_operation_unref (op);
478 }596 }
597
598 if (info->default_source_name)
599 {
600 op = pa_context_get_source_info_by_name (c,
601 info->default_source_name,
602 xvd_default_source_info_callback,
603 userdata);
604
605 if (!op)
606 {
607 g_warning("xvd_server_info_callback: pa_context_get_source_info_by_name() failed");
608 return;
609 }
610 pa_operation_unref (op);
611 }
612 else
613 {
614 /* when PulseAudio doesn't set a default source, look at all of them
615 and hope to find a usable one */
616 op = pa_context_get_source_info_list(c,
617 xvd_source_info_callback,
618 userdata);
619
620 if (!op)
621 {
622 g_warning("xvd_server_info_callback: pa_context_get_source_info_list() failed");
623 return;
624 }
625 pa_operation_unref (op);
626 }
479}627}
480628
481629
@@ -584,3 +732,105 @@
584#endif732#endif
585 }733 }
586}734}
735
736
737/**
738 * Callback to retrieve the infos of a given source.
739 */
740static void
741xvd_source_info_callback (pa_context *c,
742 const pa_source_info *source,
743 int eol,
744 void *userdata)
745{
746 XvdInstance *i = (XvdInstance *) userdata;
747
748 /* detect the end of the list */
749 if (eol > 0)
750 return;
751 else
752 {
753 if (!userdata || !source)
754 {
755 g_warning ("xvd_source_info_callback: invalid argument");
756 return;
757 }
758
759 /* If there's no default source, try to use this one */
760 if (i->source_index == PA_INVALID_INDEX
761 /* indicator-sound does that check */
762 && g_ascii_strncasecmp ("auto_null", source->name, 9) != 0)
763 {
764 i->source_index = source->index;
765 old_mic_mute = i->mic_mute = source->mute;
766 }
767 }
768}
769
770
771/**
772 * Callback to retrieve the infos of the default source.
773 */
774static void
775xvd_default_source_info_callback (pa_context *c,
776 const pa_source_info *info,
777 int eol,
778 void *userdata)
779{
780 XvdInstance *i = (XvdInstance *) userdata;
781
782 /* detect the end of the list */
783 if (eol > 0)
784 return;
785 else
786 {
787 if (!userdata || !info)
788 {
789 g_warning ("xvd_default_source_info_callback: invalid argument");
790 return;
791 }
792
793 /* is this a new default source? */
794 if (i->source_index != info->index)
795 {
796 i->source_index = info->index;
797 old_mic_mute = i->mic_mute = info->mute;
798 }
799 }
800}
801
802
803/**
804 * Callback for source changes reported by PulseAudio.
805 */
806static void
807xvd_update_source_callback (pa_context *c,
808 const pa_source_info *info,
809 int eol,
810 void *userdata)
811{
812 XvdInstance *i = (XvdInstance *) userdata;
813
814 /* detect the end of the list */
815 if (eol > 0)
816 return;
817 else
818 {
819 if (!c || !userdata || !info)
820 {
821 g_warning ("xvd_update_source_callback: invalid argument");
822 return;
823 }
824
825 /* re-fetch infos from PulseAudio */
826 i->source_index = info->index;
827 old_mic_mute = i->mic_mute;
828 i->mic_mute = info->mute;
829
830#ifdef HAVE_LIBNOTIFY
831 /* notify user of the possible changes */
832 if (old_mic_mute != i->mic_mute)
833 xvd_notify_mic_callback (c, 1, i);
834#endif
835 }
836}
587837
=== modified file 'src/xvd_pulse.h'
--- src/xvd_pulse.h 2012-05-24 21:24:41 +0000
+++ src/xvd_pulse.h 2016-02-02 19:54:56 +0000
@@ -47,6 +47,11 @@
47void xvd_toggle_mute (XvdInstance *i);47void xvd_toggle_mute (XvdInstance *i);
4848
49/**49/**
50 * Toggle mic mute.
51 */
52void xvd_toggle_mic_mute (XvdInstance *i);
53
54/**
50 * Returns a percentage volume (i.e. between 0 and 100, usable on notifications)55 * Returns a percentage volume (i.e. between 0 and 100, usable on notifications)
51 */56 */
52gint xvd_get_readable_volume (const pa_cvolume *vol);57gint xvd_get_readable_volume (const pa_cvolume *vol);

Subscribers

People subscribed via source and target branches