Bug 388553

Summary: VolumeObject::volume() should probably use pa_cvolume_max instead of the avg
Product: [Plasma] plasma-pa Reporter: Chris Holland <zrenfire>
Component: generalAssignee: David Rosca <nowrep>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, plasma-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Chris Holland 2018-01-05 07:49:13 UTC
Right now, the "master channel" uses the pa_cvolume_avg of all channels.
https://github.com/KDE/plasma-pa/blob/master/src/volumeobject.cpp#L41

The avg is also used in setGenericVolume too in context.h
https://github.com/KDE/plasma-pa/blob/master/src/context.h#L99

If you set the left channel to 50% and leave the right channel at 100% (via pulseaudio etc), the "master channel" will be the average of 75%. If you then raise the "master channel" by 10%, you raise the right channel to 110%.

Video: https://streamable.com/2kp7m

Ideally the "master volume" should be the maximum channel volume so that you can't unintentionally boost a channel over 100%.

I can probably try making a diff + testing myself, I just wanted to confirm this isn't some weird linux convention first.