summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-11-30 01:36:06 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2012-11-30 01:36:06 +0100
commitfba5272a0ab72e12d8f48c331b06eaeff3c89bd9 (patch)
treef4c921c1f07e512ea149c9e15480455b76a2a4a4
parentefddddeec94b6f9966009262c989948bd9b09c79 (diff)
downloadpulse-volume-change-notify-fba5272a0ab72e12d8f48c331b06eaeff3c89bd9.tar.gz
pulse-volume-change-notify-fba5272a0ab72e12d8f48c331b06eaeff3c89bd9.tar.xz
pulse-volume-change-notify-fba5272a0ab72e12d8f48c331b06eaeff3c89bd9.zip
add muted state to dbus signalHEADmaster
-rw-r--r--module-volume-change-notify.c8
1 files 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)