summaryrefslogtreecommitdiff
path: root/Meta/run.sh
diff options
context:
space:
mode:
authorx-yl <kylepereira@mail.com>2021-07-19 12:39:41 +0400
committerGunnar Beutner <gbeutner@serenityos.org>2021-07-27 19:15:37 +0200
commit4bdd62939a4d6806e6168548e31ddb9981c89d4f (patch)
tree2a6fe9c6c1e1b52da69546ec6efaa4777017dcac /Meta/run.sh
parentc9118b84b77bdbc2c66f7dd394244aa53019789e (diff)
downloadserenity-4bdd62939a4d6806e6168548e31ddb9981c89d4f.zip
Meta: Set -audiodev explictly
Unfortunately seems like QEMU tries to use SPICE for audio so we need to explicitly set -audiodev to use either SDL or coreaudio (depending on platorm)
Diffstat (limited to 'Meta/run.sh')
-rwxr-xr-xMeta/run.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/Meta/run.sh b/Meta/run.sh
index a171713d2f..d27060dc58 100755
--- a/Meta/run.sh
+++ b/Meta/run.sh
@@ -94,6 +94,12 @@ elif "${SERENITY_QEMU_BIN}" -chardev help | grep -iq spicevmc; then
SERENITY_SPICE_SERVER_CHARDEV="-chardev spicevmc,id=vdagent,name=vdagent"
fi
+if [ "$(uname)" = "Darwin" ]; then
+ SERENITY_AUDIO_BACKEND="-audiodev coreaudio,id=snd0"
+else
+ SERENITY_AUDIO_BACKEND="-audiodev sdl,id=snd0"
+fi
+
SERENITY_SCREENS="${SERENITY_SCREENS:-1}"
if [ "$SERENITY_SPICE" ]; then
SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-spice-app}"
@@ -146,8 +152,9 @@ $SERENITY_SPICE_SERVER_CHARDEV
-device virtconsole,chardev=stdout
-device isa-debugcon,chardev=stdout
-device virtio-rng-pci
--soundhw pcspk
--device sb16
+$SERENITY_AUDIO_BACKEND
+-machine pcspk-audiodev=snd0
+-device sb16,audiodev=snd0
-device pci-bridge,chassis_nr=1,id=bridge1 -device $SERENITY_ETHERNET_DEVICE_TYPE,bus=bridge1
-device i82801b11-bridge,bus=bridge1,id=bridge2 -device sdhci-pci,bus=bridge2
-device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3