[pulseaudio-discuss] [PATCH 1/2] pactl: Accept more volume specification formats
Colin Guthrie
gmane at colin.guthr.ie
Thu Mar 24 06:07:30 PDT 2011
'Twas brillig, and Maarten Bosmans at 24/03/11 12:44 did gyre and gimble:
> 2011/3/24 Maarten Bosmans <mkbosmans at gmail.com>:
>> With this you can specify the volume with 6554, 10%, 0.001 or -60dB,
>> all resulting in the same volume change.
>
> I was also going to add relative volumes, such as +3dB and -5%, by
> detecting a + or - sign in the volume. But that clashes with the
> absolute dB scale (insofar a dB can ever be absolute) that can also be
> negative.
>
> Any suggestions for graceful handling of this?
How about if the first letter of the volume change is an "i" or a "d"
then this indicated increment or decrement relative volume?
It's not as clean as the +/- labelling sadly but such is life.
Alternatively your absolute dB volumes could be specified as "60-dB" or
"7+dB" (where 7dB implies "7+dB")... That way the prefix +/- notation
could be used for relative adjustments. The only downside there is that
setting absolute dB volumes is more confusing (you'd never need to use
anything other than XdB for relative adjustments anyway).
Personally I'd go for the later as I think relative adjustments are
probably more common, so it's syntax should be "neatest", but I could be
very wrong :D
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list