aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-29 15:02:49 -0600
committercharles kerr <charlesk@canonical.com>2015-12-29 15:02:49 -0600
commit6b6fdbe3fbc87bc6dfe6398314582faa2677e382 (patch)
tree9a4c156c05610aa060bc3b89de6950673b1b9723
parent741c2fe564453cbb9a4d9c3acd2ba937e0da67ac (diff)
downloadayatana-indicator-sound-6b6fdbe3fbc87bc6dfe6398314582faa2677e382.tar.gz
ayatana-indicator-sound-6b6fdbe3fbc87bc6dfe6398314582faa2677e382.tar.bz2
ayatana-indicator-sound-6b6fdbe3fbc87bc6dfe6398314582faa2677e382.zip
in volume-warning, shorten the Pulse flood damper's timer
one second is too long in practice; shortening to 500 msec
-rw-r--r--src/volume-warning-pulse.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/volume-warning-pulse.vala b/src/volume-warning-pulse.vala
index 0d6800a..e42d59c 100644
--- a/src/volume-warning-pulse.vala
+++ b/src/volume-warning-pulse.vala
@@ -53,6 +53,7 @@ public class VolumeWarningPulse : VolumeWarning
private uint _update_sink_inputs_timer = 0;
private GenericSet<uint32> _pending_sink_inputs = new GenericSet<uint32>(direct_hash, direct_equal);
+ private uint soon_interval_msec = 500;
private uint32 _warning_sink_index = PulseAudio.INVALID_INDEX;
private uint32 _multimedia_sink_index = PulseAudio.INVALID_INDEX;
@@ -80,7 +81,7 @@ public class VolumeWarningPulse : VolumeWarning
GLib.message("updating multimedia volume soon");
if (_update_sink_timer == 0) {
- _update_sink_timer = Timeout.add_seconds (1, () => {
+ _update_sink_timer = Timeout.add (soon_interval_msec, () => {
_update_sink_timer = 0;
update_multimedia_volume ();
return Source.REMOVE;
@@ -146,7 +147,7 @@ public class VolumeWarningPulse : VolumeWarning
_pending_sink_inputs.add(index);
if (_update_sink_inputs_timer == 0) {
- _update_sink_inputs_timer = Timeout.add_seconds (1, () => {
+ _update_sink_inputs_timer = Timeout.add_seconds (soon_interval_msec, () => {
_pending_sink_inputs.foreach((i) => {
GLib.message("flushing input sink queue: index %d", (int)i);
update_sink_input(i);