Bug 388553 - VolumeObject::volume() should probably use pa_cvolume_max instead of the avg
Summary: VolumeObject::volume() should probably use pa_cvolume_max instead of the avg
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-05 07:49 UTC by Chris Holland
Modified: 2018-01-18 21:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.