From cf792f1c49a1d6fd024d37f430c12c57c0bb03a7 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 11 Aug 2012 21:36:51 -0400 Subject: clamp max volume more tightly max via increase is capped at 100, max via set-volume to 150 --- pulsemix.c | 6 +++--- 1 file 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); -- cgit v1.2.3