aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-01-06 23:28:51 -0600
committerCharles Kerr <charles.kerr@canonical.com>2016-01-06 23:28:51 -0600
commit4bc758000db7db9ff983540165a512ec112e8704 (patch)
tree37bb40bdaa58562e97c1332121073ed8d7016c8b /src/volume-control.vala
parent6eb56e7a2ac5cd3aede5998b8a24452a7f8138d4 (diff)
parent9a861c0911ce8345f48909993249c8a74d8bfb2c (diff)
downloadayatana-indicator-sound-4bc758000db7db9ff983540165a512ec112e8704.tar.gz
ayatana-indicator-sound-4bc758000db7db9ff983540165a512ec112e8704.tar.bz2
ayatana-indicator-sound-4bc758000db7db9ff983540165a512ec112e8704.zip
sync with trunk.15.10
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index c67bbe8..3d02f70 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -64,6 +64,7 @@ public abstract class VolumeControl : Object
public virtual bool mute { get { return false; } }
public bool is_playing { get; protected set; default = false; }
private Volume _volume;
+ private double _pre_clamp_volume;
public virtual Volume volume { get { return _volume; } set { } }
public virtual double mic_volume { get { return 0.0; } set { } }
@@ -74,6 +75,11 @@ public abstract class VolumeControl : Object
v.volume = unclamped.clamp (0.0, _options.max_volume);
v.reason = reason;
this.volume = v;
+ _pre_clamp_volume = unclamped;
+ }
+
+ public double get_pre_clamped_volume () {
+ return _pre_clamp_volume;
}
public abstract VolumeControl.ActiveOutput active_output();