From 3c28a2181761fb641893abdd9dfb304e90f6f607 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Thu, 23 Aug 2012 03:39:49 -0400 Subject: default actions are backwards --- ponymix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ponymix.c b/ponymix.c index d808d3a..c3c06ae 100644 --- a/ponymix.c +++ b/ponymix.c @@ -818,7 +818,7 @@ int main(int argc, char *argv[]) } if (optind == argc) - verb = mode == MODE_DEVICE ? ACTION_LIST : ACTION_DEFAULTS; + verb = mode == MODE_DEVICE ? ACTION_DEFAULTS : ACTION_LIST; else verb = string_to_verb(argv[optind++]); -- cgit v1.2.3 From bafddf7c3555f41eae7ee8fe0b7de64e516fa851 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Thu, 23 Aug 2012 03:47:00 -0400 Subject: increase shouldn't ever lower volume Due to the CLAMP, if you set the volume above 100 and invoke increase, it'll drop back down to 100. It probably shouldn't do this. --- ponymix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ponymix.c b/ponymix.c index c3c06ae..15f2f2f 100644 --- a/ponymix.c +++ b/ponymix.c @@ -740,6 +740,11 @@ static int do_verb(struct pulseaudio_t *pulse, enum action verb, int value) return set_balance(pulse, pulse->head, CLAMP(pulse->head->balance + value, -100, 100)); case ACTION_INCREASE: + if (pulse->head->volume_percent > 100) { + printf("%d\n", pulse->head->volume_percent); + return 0; + } + return set_volume(pulse, pulse->head, CLAMP(pulse->head->volume_percent + value, 0, 100)); case ACTION_DECREASE: -- cgit v1.2.3