Project

General

Profile

Feature #637

Command line adjust volume relatively

Added by Chris Laurie about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Minor
Assignee:
-
Category:
-
Target version:
-
Start date:
April 26, 2016
Due date:
% Done:

0%

Estimated time:
Affects version:

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 about 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 about 8 years ago

  • Status changed from New to Rejected

#3 Updated by Chris Laurie about 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 about 8 years ago

sh -c is your friend.

#5 Updated by Chris Laurie about 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.

Also available in: Atom PDF