christophgysin / pasystray

PulseAudio system tray
GNU Lesser General Public License v2.1
444 stars 43 forks source link

Use volume max for icon instead of avg #144

Closed n-peugnet closed 2 years ago

n-peugnet commented 3 years ago

Following up #141, given that pasystray will stop increasing the volume once one of the channels arrived to max, it seems logical to index the volume icon on the maximum value of all channels.

This might be a controversial change and I am open to discussion, but IMO this is usually what people expect from this icon.

Indeed, with avg, if one of the channels is set a lot higher than the other ones, the icon could show a low volume while the maximum is reached. When using channels volume as a balance setting for instance this is misguiding as one could think there is some volume left to increase when in fact it is set to the maximum.

n-peugnet commented 2 years ago

So, what do you think about this @christophgysin ?

christophgysin commented 2 years ago

What happens if you decrease the volume all the way down? In that case you would need the minimum of the two channels, otherwise you will never reach zero?

It seems there is no good solution to this. The icon can not correctly show two different volumes.

n-peugnet commented 2 years ago

Here is what happens with my patch (max):

Peek 2021-10-17 21-06

And here is what happens with the previous code (avg):

Peek 2021-10-17 21-07

n-peugnet commented 2 years ago

Maybe the notification with the sound volume will better show what I mean. Here is the icon with my patch (max):

Peek 2021-10-17 21-25

And here is the icon with the previous code (avg):

Peek 2021-10-17 21-27

See how the icon shows a low volume even if we reached the maximum allowed by pasystray

christophgysin commented 2 years ago

Thanks, this looks good :+1: