Skip to content

Commit

Permalink
Clamp volumes between a more intelligent range
Browse files Browse the repository at this point in the history
This handles volume increment/decrement better when volume is >100%.

If volume is above 100%, incrementing or decrementing the volume will
automatically drop it back down to 100%. It be better if decrementing
worked as expected and we just didn't increment the volume further.

Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
  • Loading branch information
vodik committed Apr 10, 2013
1 parent 6922219 commit 898271e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ponymix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static int adj_volume(PulseClient& ponymix,
errx(1, "error: failed to convert string to integer: %s", argv[0]);
}

ponymix.SetVolumeRange(0, 100);
ponymix.SetVolumeRange(0, device->Volume());
return !(ponymix.*adjust)(*device, delta);
}

Expand Down

1 comment on commit 898271e

@falconindy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it. Doesn't this effectively prevent you from increasing the volume if the max is the current (pre-adjustment)?

Please sign in to comment.