diff options
author | Simon Rettberg | 2021-10-28 16:28:38 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-10-28 16:28:38 +0200 |
commit | 78c69c09c7c31e87b720c505e60097297b1d53e4 (patch) | |
tree | 6d7deacb419e03ac9a0820f8e9ded0eec882036a | |
parent | [run-virt] Support PulseAudio when unmuting (diff) | |
download | mltk-78c69c09c7c31e87b720c505e60097297b1d53e4.tar.gz mltk-78c69c09c7c31e87b720c505e60097297b1d53e4.tar.xz mltk-78c69c09c7c31e87b720c505e60097297b1d53e4.zip |
[run-virt] Add PulseAudio support
-rw-r--r-- | core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_sound.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_sound.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_sound.inc index e596b0f2..5c8e2870 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_sound.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_sound.inc @@ -19,10 +19,12 @@ setup_sound() { # Default to maximum volume notempty VOL || VOL="100%" - if ! check_dep pactl || [ "$(amixer | grep -c '^Simple mixer' )" -gt 3 ]; then - check_dep amixer && set_sound_alsa + # If we don't have pulse, or more than three output devices, try to set up alsa + if ! command -v pactl > /dev/null || [ "$(amixer | grep -c '^Simple mixer' )" -gt 3 ]; then + command -v amixer > /dev/null && set_sound_alsa fi - if check_dep pactl; then + # pactl exists, assume we're running PA + if command -v pactl > /dev/null; then set_sound_pulse fi writelog --quiet "Done setting up volume." |