Merge lp:~larsu/indicator-sound/lp1374249 into lp:indicator-sound/14.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Ted Gould
Approved revision: 447
Merged at revision: 450
Proposed branch: lp:~larsu/indicator-sound/lp1374249
Merge into: lp:indicator-sound/14.10
Diff against target: 24 lines (+4/-3)
1 file modified
src/volume-control.vala (+4/-3)
To merge this branch: bzr merge lp:~larsu/indicator-sound/lp1374249
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+236729@code.launchpad.net

Commit message

Volume control: properly scale channels when setting the volume

Description of the change

Volume control: properly scale channels when setting the volume

And display the volume of the loudest channel in the UI. This is consistent with gnome-control-center.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Going to not comment on people with unbalanced speakers :-) Patch looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/volume-control.vala'
2--- src/volume-control.vala 2014-04-18 17:41:44 +0000
3+++ src/volume-control.vala 2014-10-01 14:56:48 +0000
4@@ -129,9 +129,9 @@
5 this.notify_property ("is-playing");
6 }
7
8- if (_volume != volume_to_double (i.volume.values[0]))
9+ if (_volume != volume_to_double (i.volume.max ()))
10 {
11- _volume = volume_to_double (i.volume.values[0]);
12+ _volume = volume_to_double (i.volume.max ());
13 volume_changed (_volume);
14 }
15 }
16@@ -310,7 +310,8 @@
17 if (i == null)
18 return;
19
20- unowned CVolume cvol = vol_set (i.volume, 1, double_to_volume (_volume));
21+ unowned CVolume cvol = i.volume;
22+ cvol.scale (double_to_volume (_volume));
23 c.set_sink_volume_by_index (i.index, cvol, set_volume_success_cb);
24 }
25

Subscribers

People subscribed via source and target branches