From fba5272a0ab72e12d8f48c331b06eaeff3c89bd9 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 30 Nov 2012 01:36:06 +0100 Subject: add muted state to dbus signal --- module-volume-change-notify.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module-volume-change-notify.c b/module-volume-change-notify.c index 93a269c..d7d0526 100644 --- a/module-volume-change-notify.c +++ b/module-volume-change-notify.c @@ -69,7 +69,8 @@ dbus_bool_t add_volumes(DBusMessageIter *args, const pa_cvolume *vol) return TRUE; } -void send_dbus_signal(const char *name, const pa_cvolume *vol, +void send_dbus_signal(const char *name, const pa_bool_t muted, + const pa_cvolume *vol, const struct userdata *u) { DBusMessage* msg; @@ -87,6 +88,9 @@ void send_dbus_signal(const char *name, const pa_cvolume *vol, if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &name)) goto fail; + if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_BOOLEAN, &muted)) + goto fail; + if (!add_volumes(&args, vol)) goto fail; @@ -116,7 +120,7 @@ void sink_change_event_cb(pa_core *c, pa_subscription_event_type_t t, if (!s) return; - send_dbus_signal(s->name, &s->reference_volume, userdata); + send_dbus_signal(s->name, s->muted, &s->reference_volume, userdata); } void pa__done(pa_module *m) -- cgit v1.2.3