aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-08-11 21:36:51 -0400
committerDave Reisner <dreisner@archlinux.org>2012-08-11 21:36:51 -0400
commitcf792f1c49a1d6fd024d37f430c12c57c0bb03a7 (patch)
tree63e8e2b5da799a22e53d2e7bbc0f9c14fc429828
parent0e77db80f07dc826c3e475fd7197cc84bb57b0ee (diff)
downloadmirror-ponymix-cf792f1c49a1d6fd024d37f430c12c57c0bb03a7.tar.gz
mirror-ponymix-cf792f1c49a1d6fd024d37f430c12c57c0bb03a7.tar.bz2
mirror-ponymix-cf792f1c49a1d6fd024d37f430c12c57c0bb03a7.zip
clamp max volume more tightly
max via increase is capped at 100, max via set-volume to 150
-rw-r--r--pulsemix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pulsemix.c b/pulsemix.c
index 52058fb..475da78 100644
--- a/pulsemix.c
+++ b/pulsemix.c
@@ -779,7 +779,7 @@ int main(int argc, char *argv[])
printf("%d\n", pulse.head->volume_percent);
break;
case ACTION_SETVOL:
- rc = set_volume(&pulse, pulse.head, value);
+ rc = set_volume(&pulse, pulse.head, CLAMP(value, 0, 150));
break;
case ACTION_GETBAL:
printf("%d\n", pulse.head->balance);
@@ -790,11 +790,11 @@ int main(int argc, char *argv[])
break;
case ACTION_INCREASE:
rc = set_volume(&pulse, pulse.head,
- CLAMP(pulse.head->volume_percent + value, 0, 150));
+ CLAMP(pulse.head->volume_percent + value, 0, 100));
break;
case ACTION_DECREASE:
rc = set_volume(&pulse, pulse.head,
- CLAMP(pulse.head->volume_percent - value, 0, 150));
+ CLAMP(pulse.head->volume_percent - value, 0, 100));
break;
case ACTION_MUTE:
rc = set_mute(&pulse, pulse.head, 1);