[pulseaudio-discuss] [PATCH 1/2] pactl: Accept more volume specification formats

Colin Guthrie gmane at colin.guthr.ie
Thu Mar 24 13:26:11 PDT 2011


'Twas brillig, and Tanu Kaskinen at 24/03/11 18:31 did gyre and gimble:
> On Thu, 2011-03-24 at 22:22 +0530, Arun Raghavan wrote:
>> On Thu, 2011-03-24 at 13:07 +0000, Colin Guthrie wrote:
>>> '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
>>
>> Or maybe just do this as a separate set-volume-step command (or
>> -increment or something better named)?
> 
> I agree - I think a separate command is a good idea. For command naming,
> I suggest "increase-sink-volume" and "decrease-sink-volume".

While I think this is a valid solution, I'd prefer to see a single
command for the volume adjustment (change-sink-volume?) but use the +/-
notation. When we're talking relative adjustments the problem of how the
+'s and -'s are interpreted is gone anyway, so this is possible.

But I'm not overly fussed so if two commands for inc+dec is easier then
so be it.

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