Open gondsman opened 4 years ago
I snap it to 100% if there's less than 1 step to avoid jumping to 99% or something.
In PulseAudio, 100% is "65536", and if you divide it by 100, then each step is "655.36". You can't set a Real number to an Integer, so I added that bit of code to avoid losing 0.36 * 100 = 36
away from 100%.
I think I'll lower the threshold to max - volume < step * 0.5
. Assuming each step is 10%, it would only jump to 100% if there's less than 5% (86 => 96%).
There's something wonky with the volume changing steps because when I increase the volume (either via shortcut or scroll wheel) the last step is always skipped. For example, if the step is 10%, it goes 60->70->80->100, but going the other way around is correct (100->90->80). Am I missing something?