diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-04-10 10:11:15 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-04-10 10:12:43 -0400 |
commit | 7d987d2d5e18d60a3faa84edff8f9738ac90f068 (patch) | |
tree | 11e603100b058bc60d57d3516fa97c46ecde8ba5 | |
parent | b8e53640751c0e8086802d62ac0cbf4e4d10a30c (diff) | |
download | mirror-ponymix-7d987d2d5e18d60a3faa84edff8f9738ac90f068.tar.gz mirror-ponymix-7d987d2d5e18d60a3faa84edff8f9738ac90f068.tar.bz2 mirror-ponymix-7d987d2d5e18d60a3faa84edff8f9738ac90f068.zip |
clamp max volume based on max(dev->vol(), 100)
Fixes GHI#17.
-rw-r--r-- | ponymix.cc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -317,7 +317,9 @@ static int adj_volume(PulseClient& ponymix, errx(1, "error: failed to convert string to integer: %s", argv[0]); } - ponymix.SetVolumeRange(0, 100); + // Allow setting the volume over 100, but don't "clip" the level back down to + // 100 on adjustment. + ponymix.SetVolumeRange(0, std::max(device->Volume(), 100)); return !(ponymix.*adjust)(*device, delta); } |