]> git.sur5r.net Git - i3/i3status/commit
Provide a more natural volume percentage with ALSA.
authorarcnmx <arcnmx@users.noreply.github.com>
Wed, 21 Feb 2018 18:25:08 +0000 (13:25 -0500)
committerOrestis <orestisf1993@gmail.com>
Wed, 10 Oct 2018 21:21:03 +0000 (00:21 +0300)
commitddadc8e4d728923cf5bc7c8a894b103cf061c47d
treef278c0a2e647b589d2f3892881ef1785b105705f
parent494efd49a26ed96d7b0d3d4f69099ccd83e2ccba
Provide a more natural volume percentage with ALSA.

The rationale of the code is explained in the header:
http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsamixer/volume_mapping.c;h=1c0d7c45e6686239464e1b0bbc8983ea57f3914f;hb=HEAD
> The mapping is designed so that the position in the interval is
> proportional to the volume as a human ear would perceive it (i.e., the
> position is the cubic root of the linear sample multiplication
> factor).

and the commit message:
http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=34bb514b5fd1d6f91ba9a7b3a70b0ea0c6014250
> use a mapping where the bar height is proportional to the audible
> volume, i.e., where the amplitude is the cube of the bar height.

and further explanation can be found in the pull request:
https://github.com/i3/i3status/pull/268#pullrequestreview-147429763
src/print_volume.c