aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-08-11 12:12:16 -0400
committerDave Reisner <dreisner@archlinux.org>2012-08-11 12:12:16 -0400
commitcd1e1f3d062e48d14bfc61d9a73bb50f92accfc1 (patch)
tree3dd0e5659ff7e30fa356419d09f1a550578a4792
parent23f2ced7b59b01e9eaa59303f972930b3066801e (diff)
downloadmirror-ponymix-cd1e1f3d062e48d14bfc61d9a73bb50f92accfc1.tar.gz
mirror-ponymix-cd1e1f3d062e48d14bfc61d9a73bb50f92accfc1.tar.bz2
mirror-ponymix-cd1e1f3d062e48d14bfc61d9a73bb50f92accfc1.zip
print effective volume after mute operation
-rw-r--r--pulsemix.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pulsemix.c b/pulsemix.c
index 13481d5..2a3fabc 100644
--- a/pulsemix.c
+++ b/pulsemix.c
@@ -288,8 +288,14 @@ static int set_balance(struct pulseaudio_t *pulse, struct io_t *dev, long v)
static int set_mute(struct pulseaudio_t *pulse, struct io_t *dev, int mute)
{
- pa_operation* op = pulse->head->fn_mute(pulse->cxt, dev->idx, mute,
- success_cb, pulse);
+ pa_operation* op;
+
+ /* new effective volume */
+ printf("%d\n", mute ? 0 : dev->volume_percent);
+
+ op = pulse->head->fn_mute(pulse->cxt, dev->idx, mute,
+ success_cb, pulse);
+
pulse_async_wait(pulse, op);
if (!pulse->success) {