Closed kevincox closed 11 years ago
increase and decrease are bound by the caps -- however, set-volume is not (it has a higher cap).
Yeah, but I want to use increase/decrease with a different cap. If I had to get the volume, add to it and set it using set-volume to get around the cap I may as well just use pacmd.
I suppose it makes sense to have this configurable.
I've been poking at implementing this and its rather straightforward but interacts with set-volume:
--max-volume
?--max-volume
even when its below 150?Note that:
Maybe set-volume shouldn't clamp at all.
Those are some really interesting points. Here are some of my thoughts
That being said I think that clamping increment
and decrement
by default make perfect sense, especially because a common use case is binding them to a key for volume control (I would imagine).
Putting a default maximum on set-volume
makes sense so simple scripts don't make the sound garbage quality, but it also makes sense that set-volume
simply sets the volume to what was passed in.
For set-volume
I don't think there is a "correct" default but I would leave it how it is now, and if --max-volume
is set use that as the limit both when higher and lower than the default. There should also be a way to unlimit it (-1 maybe, is there a use for 0 that it shouldn't be used?) if that isn't made the default.
Sorry for the long response, but I blabbered because I'm not really decided either way.
I don't think it's that interesting. If you ignore --max-volume, then you get the sane defaults that I hardcode. If you pass --max-volume, then you can do whatever you want. It won't be my eardrums.
Implemented in 92e4b9772a46f4b40b47df44fd3964c868e3c12f
Thanks, it works great.
Clamping the volume at 100% is a great feature but it would be nice to allow overriding this. It would be nice to have a flag that changed the cap value.