diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-08-11 21:36:51 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-08-11 21:36:51 -0400 |
commit | cf792f1c49a1d6fd024d37f430c12c57c0bb03a7 (patch) | |
tree | 63e8e2b5da799a22e53d2e7bbc0f9c14fc429828 | |
parent | 0e77db80f07dc826c3e475fd7197cc84bb57b0ee (diff) | |
download | mirror-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |