diff options
author | Ted Gould <ted@gould.cx> | 2014-11-05 10:37:49 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-11-05 10:37:49 -0600 |
commit | 6e525389ca3139b6063f1449d79c4cf688e28f1d (patch) | |
tree | 4ae9d6c64f7927d742c719e0ae5433e569c5c251 | |
parent | 3c350eabc0e9eef095933819fc168d8183630eb5 (diff) | |
parent | 8cfba863c2ce74c326cb31f13f14a1de801e69f2 (diff) | |
download | ayatana-indicator-sound-6e525389ca3139b6063f1449d79c4cf688e28f1d.tar.gz ayatana-indicator-sound-6e525389ca3139b6063f1449d79c4cf688e28f1d.tar.bz2 ayatana-indicator-sound-6e525389ca3139b6063f1449d79c4cf688e28f1d.zip |
service.vala: don't call set_volume unnecessarily (LP: #1381871)
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | src/service.vala | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 651092c..55b6407 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,11 @@ -indicator-sound (12.10.2+14.10.20141010-0ubuntu4) UNRELEASED; urgency=medium +indicator-sound (12.10.2+14.10.20141010-0ubuntu5) UNRELEASED; urgency=medium * Remove various Vala warnings * Show notifications on volume change (LP: #1378564, #1378961) * Warn on high audio levels when using headphones (LP: #123633, #1373404) + * service.vala: don't call set_volume unnecessarily (LP: #1381871) - -- Ted Gould <ted@ubuntu.com> Wed, 05 Nov 2014 10:34:00 -0600 + -- Ted Gould <ted@ubuntu.com> Wed, 05 Nov 2014 10:37:17 -0600 indicator-sound (12.10.2+14.10.20141010-0ubuntu1) utopic; urgency=low diff --git a/src/service.vala b/src/service.vala index 7daa6db..fd0c08d 100644 --- a/src/service.vala +++ b/src/service.vala @@ -131,6 +131,9 @@ public class IndicatorSound.Service: Object { } set { + if (this.allow_amplified_volume == value) + return; + if (value) { /* from pulse/volume.h: #define PA_VOLUME_UI_MAX (pa_sw_volume_from_dB(+11.0)) */ this.max_volume = (double)PulseAudio.Volume.sw_from_dB(11.0) / PulseAudio.Volume.NORM; |