aboutsummaryrefslogtreecommitdiff
path: root/src/volume-warning-pulse.vala
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-29 16:16:13 -0600
committercharles kerr <charlesk@canonical.com>2015-12-29 16:16:13 -0600
commitc7796f4ddfe0b11ecb76853ba5dca17748c725c1 (patch)
treed01c965c01b4a575d708a5f2a7b5bf6c2d07e4b0 /src/volume-warning-pulse.vala
parent637af434c801d6be5909441217b66afd03f0dcc0 (diff)
downloadayatana-indicator-sound-c7796f4ddfe0b11ecb76853ba5dca17748c725c1.tar.gz
ayatana-indicator-sound-c7796f4ddfe0b11ecb76853ba5dca17748c725c1.tar.bz2
ayatana-indicator-sound-c7796f4ddfe0b11ecb76853ba5dca17748c725c1.zip
remove unnecessary field vol-warning-pulse.multimedia_cvolume
Diffstat (limited to 'src/volume-warning-pulse.vala')
-rw-r--r--src/volume-warning-pulse.vala9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/volume-warning-pulse.vala b/src/volume-warning-pulse.vala
index 5b6b632..14b3e71 100644
--- a/src/volume-warning-pulse.vala
+++ b/src/volume-warning-pulse.vala
@@ -46,7 +46,7 @@ public class VolumeWarningPulse : VolumeWarning
GLib.return_if_fail(volume != PulseAudio.Volume.INVALID);
unowned CVolume cvol = CVolume ();
- cvol.set (_multimedia_cvolume.channels, volume);
+ cvol.set (1, volume);
GLib.message ("setting multimedia volume to %s", cvol.to_string());
_pulse_context.set_sink_volume_by_index (index, cvol);
}
@@ -72,8 +72,6 @@ public class VolumeWarningPulse : VolumeWarning
private uint32 _multimedia_sink_index = PulseAudio.INVALID_INDEX;
private uint32 _multimedia_sink_input_index = PulseAudio.INVALID_INDEX;
- private unowned PulseAudio.CVolume _multimedia_cvolume;
-
/***/
private void update_multimedia_volume () {
@@ -82,11 +80,8 @@ public class VolumeWarningPulse : VolumeWarning
GLib.return_if_fail(_multimedia_sink_index != PulseAudio.INVALID_INDEX);
_pulse_context.get_sink_info_by_index(_multimedia_sink_index, (c,i) => {
- if (i != null) {
- GLib.message("setting multimedia_volume to %s", i.volume.to_string());
- _multimedia_cvolume = i.volume;
+ if (i != null)
multimedia_volume = i.volume.max();
- }
});
}