# Volume
# -----------------------------------------------------------------------------
-function bar_make_status_volume_pulseaudio_sink(sink, mu, vl, vr, show) {
- cache_get(mu, "khatus_sensor_volume", "mute" Kfs sink, 5)
- cache_get(vl, "khatus_sensor_volume", "vol_left" Kfs sink, 5)
- cache_get(vr, "khatus_sensor_volume", "vol_right" Kfs sink, 5)
+function bar_make_status_volume_alsa_device(device, mu, vl, vr, show) {
+ cache_get(mu, "khatus_sensor_volume", "mute" Kfs device, 5)
+ cache_get(vl, "khatus_sensor_volume", "vol_left" Kfs device, 5)
+ cache_get(vr, "khatus_sensor_volume", "vol_right" Kfs device, 5)
show = "--"
if (!mu["is_expired"] && !vl["is_expired"] && !vr["is_expired"]) {
if (mu["value"] == "yes") {show = "X"}
else if (mu["value"] == "no") {show = vl["value"] " " vr["value"]}
else {
msg_out_log_error(\
- "bar_make_status_volume_pulseaudio_sink: " sink ". ", \
+ "bar_make_status_volume_alsa_device: " device ". ", \
"Unexpected value for 'mute' field: " mu["value"] \
)
}