diff options
| author | Simon Gomizelj <simongmzlj@gmail.com> | 2012-08-23 03:47:00 -0400 | 
|---|---|---|
| committer | Simon Gomizelj <simongmzlj@gmail.com> | 2012-08-23 03:47:03 -0400 | 
| commit | bafddf7c3555f41eae7ee8fe0b7de64e516fa851 (patch) | |
| tree | 1f2e81238e37efba9fdd06eb2ac75d9ec29cda80 | |
| parent | 3c28a2181761fb641893abdd9dfb304e90f6f607 (diff) | |
| download | mirror-ponymix-bafddf7c3555f41eae7ee8fe0b7de64e516fa851.tar.gz mirror-ponymix-bafddf7c3555f41eae7ee8fe0b7de64e516fa851.tar.bz2 mirror-ponymix-bafddf7c3555f41eae7ee8fe0b7de64e516fa851.zip  | |
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.
| -rw-r--r-- | ponymix.c | 5 | 
1 files changed, 5 insertions, 0 deletions
@@ -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:  | 
