https://bugs.kde.org/show_bug.cgi?id=435522

Chris Holland <zrenf...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/plasma-pa/commit/dedcbcc
                   |                            |f753545795c0194fd98cca081e4
                   |                            |7baf70
   Version Fixed In|                            |5.21.5
         Resolution|---                         |FIXED

--- Comment #2 from Chris Holland <zrenf...@gmail.com> ---
Git commit dedcbccf753545795c0194fd98cca081e47baf70 by Chris Holland.
Committed on 20/04/2021 at 02:56.
Pushed by ngraham into branch 'master'.

Increment volume by percent instead of a constant volumeStep

Jumping by a fixed volumeStep has issues as the value is rounded.
65536/100 = 655.36
65536/100*5 = 3276.8
volumeStep = round(3276.8) = 3277

The floor() patch has an easy to test bug when jumping from 100% to
94% instead of 95% since volumeStep is rounded up.
Eg: 65536 => 62259 (-3277) 100% => 94%  (-6%)

The original round() logic also has issues when volume is around:
f(x) = (65536/100) / 2 + (65536/100) * x

amixer sset Master 983 # f(1)=983.04
Eg: 983 => 4260 (+3277) 1% => 7%  (+6%)

This patch adds changeVolumeByPercent(volumeObject, deltaPercent) to
increment any sink or source by a %volume. It also moves the common
code in increaseVolume() and decreaseVolume() into a new function.
Related: bug 434769
FIXED-IN: 5.21.5

M  +33   -32   applet/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-pa/commit/dedcbccf753545795c0194fd98cca081e47baf70

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to