diff options
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r-- | src/volume-control.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala index 30dcfcf..7117990 100644 --- a/src/volume-control.vala +++ b/src/volume-control.vala @@ -54,6 +54,7 @@ public abstract class VolumeControl : Object public virtual bool is_playing { get { return false; } } public virtual VolumeControl.ActiveOutput active_output { get { return VolumeControl.ActiveOutput.SPEAKERS; } } 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 { } } public virtual double max_volume { get { return 1.0; } protected set { } } @@ -70,6 +71,11 @@ public abstract class VolumeControl : Object v.volume = unclamped.clamp (0.0, this.max_volume); v.reason = reason; this.volume = v; + _pre_clamp_volume = unclamped; + } + + public double get_pre_clamped_volume () { + return _pre_clamp_volume; } public signal void active_output_changed (VolumeControl.ActiveOutput active_output); |