From 597ef6c0d65851fb316207bd32784b49098b19cf Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 6 Jan 2013 22:09:39 -0500 Subject: use convenient methods for increase/decrease --- ponymix.cc | 4 ++-- pulse.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ponymix.cc b/ponymix.cc index f0cbccb..71bf64b 100644 --- a/ponymix.cc +++ b/ponymix.cc @@ -335,7 +335,7 @@ static int IncreaseVolume(PulseClient& ponymix, int, char* argv[]) { errx(1, "error: failed to convert string to integer: %s", argv[0]); } - if (!ponymix.SetVolume(*device, device->Volume() + delta)) return 1; + if (!ponymix.IncreaseVolume(*device, delta)) return 1; printf("%d\n", device->Volume()); @@ -352,7 +352,7 @@ static int DecreaseVolume(PulseClient& ponymix, int, char* argv[]) { errx(1, "error: failed to convert string to integer: %s", argv[0]); } - if (!ponymix.SetVolume(*device, device->Volume() - delta)) return 1; + if (!ponymix.DecreaseVolume(*device, delta)) return 1; printf("%d\n", device->Volume()); diff --git a/pulse.cc b/pulse.cc index 6617a4f..26f58eb 100644 --- a/pulse.cc +++ b/pulse.cc @@ -358,7 +358,7 @@ bool PulseClient::SetVolume(Device& device, long volume) { int success; if (device.ops_.SetVolume == nullptr) { - warnx("device does not support setting balance."); + warnx("device does not support setting volume."); return false; } -- cgit v1.2.3