diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-07-30 13:03:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-30 23:51:26 +0200 |
commit | 8b2e76b838757a7528ddb64de47ef10efe042f98 (patch) | |
tree | 08aac64f20988a0c94fdab9f93a7b47f4b9757df /Meta/run.sh | |
parent | 9222064439fd3326432f68817d2cbb1c26899f1c (diff) | |
download | serenity-8b2e76b838757a7528ddb64de47ef10efe042f98.zip |
Meta: Make audiodev detection more robust
This fixes audio on Windows as well as Linux systems which don't have
SDL.
Fixes #8903.
Diffstat (limited to 'Meta/run.sh')
-rwxr-xr-x | Meta/run.sh | 6 |
1 files changed, 5 insertions, 1 deletions
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}" |