aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-28 14:55:17 -0600
committercharles kerr <charlesk@canonical.com>2015-12-28 14:55:17 -0600
commitc8c14de795a67dc6887e278fc3720a210154f954 (patch)
tree7e28f940360387809ebd9bfd8226d27de7732fdf /src
parent3c4fa4e68bd3a7b58a69a378fb22c8ffbc3d2e12 (diff)
downloadayatana-indicator-sound-c8c14de795a67dc6887e278fc3720a210154f954.tar.gz
ayatana-indicator-sound-c8c14de795a67dc6887e278fc3720a210154f954.tar.bz2
ayatana-indicator-sound-c8c14de795a67dc6887e278fc3720a210154f954.zip
fix pa_cvolume_set call
Diffstat (limited to 'src')
-rw-r--r--src/volume-warning.vala19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/volume-warning.vala b/src/volume-warning.vala
index ea24875..130fb79 100644
--- a/src/volume-warning.vala
+++ b/src/volume-warning.vala
@@ -70,7 +70,7 @@ public class VolumeWarning : Object
The next line says 'uint' to unconfuse valac's code generator */
protected uint multimedia_volume { get; set; default = PulseAudio.Volume.MUTED; }
- protected virtual void set_multimedia_volume(PulseAudio.Volume volume) {
+ protected virtual void _set_multimedia_volume(PulseAudio.Volume volume) {
pulse_set_sink_input_volume(volume);
}
@@ -273,8 +273,6 @@ public class VolumeWarning : Object
///
- private PulseAudio.Operation _set_sink_input_volume_operation = null;
-
private void pulse_set_sink_input_volume_cancel()
{
if (_set_sink_input_volume_operation != null) {
@@ -295,13 +293,12 @@ public class VolumeWarning : Object
GLib.return_if_fail(_pulse_context != null);
GLib.return_if_fail(_multimedia_sink_input_index != PulseAudio.INVALID_INDEX);
- unowned CVolume cvol = CVolume();
- cvol.pa_cvolume_set(_multimedia_cvolume.channels, volume);
- GLib.message("setting multimedia volume to %s", cvol.to_string());
-
pulse_set_sink_input_volume_cancel();
- _set_sink_input_volume_operation = set_sink_input_volume(
+ unowned CVolume cvol = CVolume();
+ cvol.set(_multimedia_cvolume.channels, volume);
+ GLib.message("setting multimedia volume to %s", cvol.to_string());
+ _set_sink_input_volume_operation = _pulse_context.set_sink_input_volume(
_multimedia_sink_input_index,
cvol,
on_set_sink_input_volume_success);
@@ -464,9 +461,7 @@ public class VolumeWarning : Object
// lower the volume to just under the warning level
GLib.message("setting multimedia volume to be just under the warning level");
- pulse_set_sink_input_volume(pulse_set_sink_input_volume(zzz
-
- set_multimedia_volume (_options.loud_volume()-1);
+ _set_multimedia_volume (_options.loud_volume()-1);
GLib.message("leaving show()");
}
@@ -474,7 +469,7 @@ public class VolumeWarning : Object
if (response == IndicatorSound.WarnNotification.Response.OK) {
approve_high_volume();
- set_multimedia_volume(_ok_volume);
+ _set_multimedia_volume(_ok_volume);
}
_ok_volume = PulseAudio.Volume.INVALID;