From 8b2e76b838757a7528ddb64de47ef10efe042f98 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 30 Jul 2021 13:03:13 +0200 Subject: Meta: Make audiodev detection more robust This fixes audio on Windows as well as Linux systems which don't have SDL. Fixes #8903. --- Meta/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Meta/run.sh') diff --git a/Meta/run.sh b/Meta/run.sh index d27060dc58..edcfe1a1b7 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -96,8 +96,12 @@ fi if [ "$(uname)" = "Darwin" ]; then SERENITY_AUDIO_BACKEND="-audiodev coreaudio,id=snd0" -else +elif (uname -a | grep -iq WSL) || (uname -a | grep -iq microsoft); then + SERENITY_AUDIO_BACKEND="-audiodev dsound,id=snd0" +elif "$SERENITY_QEMU_BIN" -audio-help 2>&1 | grep -- "-audiodev id=sdl" >/dev/null; then SERENITY_AUDIO_BACKEND="-audiodev sdl,id=snd0" +else + SERENITY_AUDIO_BACKEND="-audiodev pa,id=snd0" fi SERENITY_SCREENS="${SERENITY_SCREENS:-1}" -- cgit v1.2.3