aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control-pulse.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/volume-control-pulse.vala')
-rw-r--r--src/volume-control-pulse.vala14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala
index 76368f2..9ac7dce 100644
--- a/src/volume-control-pulse.vala
+++ b/src/volume-control-pulse.vala
@@ -56,10 +56,18 @@ public class VolumeControlPulse : VolumeControl
private string[] _valid_roles = {"multimedia", "alert", "alarm", "phone"};
public override string stream {
get {
- if (_active_sink_input < 0 || _active_sink_input >= _valid_roles.length)
+ if (_active_sink_input == -1)
return "alert";
- else
- return _valid_roles[_active_sink_input];
+ var path = _sink_input_hash[_active_sink_input];
+ if (path == _objp_role_multimedia)
+ return "multimedia";
+ if (path == _objp_role_alert)
+ return "alert";
+ if (path == _objp_role_alarm)
+ return "alarm";
+ if (path == _objp_role_phone)
+ return "phone";
+ return "alert";
}
}
private string? _objp_role_multimedia = null;