aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-08-20 13:31:43 -0400
committerDave Reisner <dreisner@archlinux.org>2014-08-20 13:31:43 -0400
commit02762524f5a1d308f25812113a55770f0335c361 (patch)
tree249a96a1deebb4fa6aeea622335fc2b59018bd09
parent0b37cc5e37bbe0898505edfd4faea9981888bd07 (diff)
downloadmirror-ponymix-02762524f5a1d308f25812113a55770f0335c361.tar.gz
mirror-ponymix-02762524f5a1d308f25812113a55770f0335c361.tar.bz2
mirror-ponymix-02762524f5a1d308f25812113a55770f0335c361.zip
Revert "pulse: use ceil() instead of floor() for volume percentages"
This commit introduced a functional bug at the cost of attempting to fix a cosmetic one. This reverts commit 067f37d641ab7ae7171ea4bb362e723b0089e671.
-rw-r--r--pulse.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/pulse.cc b/pulse.cc
index 1b498b0..1253c2d 100644
--- a/pulse.cc
+++ b/pulse.cc
@@ -77,7 +77,7 @@ static pa_cvolume* value_to_cvol(long value, pa_cvolume *cvol) {
}
static int volume_as_percent(const pa_cvolume* cvol) {
- return pa_cvolume_avg(cvol) * 100.0 / PA_VOLUME_NORM + 0.5;
+ return pa_cvolume_avg(cvol) * 100.0 / PA_VOLUME_NORM;
}
static int xstrtol(const char *str, long *out) {