forked from external/yambar
module/alsa: use channel’s dB range instead of raw volume, if available
For channels that have a defined dB range, use that instead of the raw volume range when calculating the volume percent. Also use the same logic as alsamixer when calculating the percent from the dB values: assume a linear scale if the dB range is “small enough”, and otherwise normalize it against a logarithmic scale. With this, yambar’s “percent” value matches alsamixer’s exactly. The ‘volume’ tag remains unchanged - it always reflects the raw volume values. Instead, we add a new tag ‘dB’, that reflects the dB values. Closes #202
This commit is contained in:
parent
a0c07d7836
commit
6c10eb2153
4 changed files with 141 additions and 20 deletions
|
@ -215,7 +215,7 @@ bar:
|
|||
muted: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
~muted:
|
||||
ramp:
|
||||
tag: volume
|
||||
tag: percent
|
||||
items:
|
||||
- string: {text: , font: *awesome}
|
||||
- string: {text: , font: *awesome}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue