From 7e7f4af3361d7275cb360db0e3dbff3aac569ebe Mon Sep 17 00:00:00 2001 From: Xavi Garcia Mena Date: Thu, 17 Dec 2015 12:07:05 +0100 Subject: Maroon in trouble and other games changing the volume in sink and changing role workaround --- src/volume-control-pulse.vala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala index 66b6ba4..3791f29 100644 --- a/src/volume-control-pulse.vala +++ b/src/volume-control-pulse.vala @@ -344,7 +344,10 @@ public class VolumeControlPulse : VolumeControl var vol = new VolumeControl.Volume(); vol.volume = volume_to_double (lvolume); vol.reason = VolumeControl.VolumeReasons.PULSE_CHANGE; - this.volume = vol; + // Ignore changes from PULSE to avoid issues with + // some apps that change the volume in the sink + // We only take into account volume changes from the user + //this.volume = vol; } } } @@ -388,7 +391,10 @@ public class VolumeControlPulse : VolumeControl var vol = new VolumeControl.Volume(); vol.volume = volume_to_double (volume); vol.reason = VolumeControl.VolumeReasons.VOLUME_STREAM_CHANGE; - this.volume = vol; + // Ignore changes from PULSE to avoid issues with + // some apps that change the volume in the sink + // We only take into account volume changes from the user + //this.volume = vol; } catch (GLib.Error e) { warning ("unable to get volume for active role %s (%s)", sink_input_objp, e.message); } -- cgit v1.2.3