Feature #637
Command line adjust volume relatively
0%
Description
I want to adjust the volume of the playing track relative to the current volume. With audtool I can set the volume to an absolute value. What I would like to have is a volume adjust functionality relative to the current.
Something like:
--set-volume-relative <level>
and this adjust the current volume by the level as a percentage. Examples:
--set-volume-relative 5 would increase volume from 80% to 84% and from 50% to 53%
--set-volume-relative -5 would decrease volume from 80% to 76% and from 50% to 48%
History
#1 Updated by John Lindgren over 8 years ago
Use:
audtool set-volume $((`audtool get-volume` + 5)) audtool set-volume $((`audtool get-volume` - 5))
Or alternatively:
audtool set-volume $((`audtool get-volume` * 95 / 100)) audtool set-volume $((`audtool get-volume` * 105 / 100))
#2 Updated by John Lindgren over 8 years ago
- Status changed from New to Rejected
#3 Updated by Chris Laurie over 8 years ago
That works from the command line but the app I use cannot handle the parameter expansion. So other calls that is straight command line with parameters works, but the parameter expansion fails.
#4 Updated by John Lindgren over 8 years ago
sh -c
is your friend.
#5 Updated by Chris Laurie over 8 years ago
In the end I opted to write a shell scripting file that does this. This solution will probably not work in Windows. So I still think that there should be an api for this:
audtool adjust-volume N
where N is and integer (positive or negative) which the current volume is adjusted upwards or downwards relative to the current volume.