From a768685d1644158cbb2ec83d84de9b069ed83e3f Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Wed, 27 Dec 2023 20:17:08 +0200 Subject: [PATCH] Meta: Add support for QEMU 8.2 audio Still try parsing the now gone "-audio-help" output first, then attempt the new "-audiodev help" if stdout was empty. This fixes support for QEMU 8.2+ audio since "-audio-help" is now an invalid option. --- Meta/run.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Meta/run.py b/Meta/run.py index 00113b9e88..975c742ce0 100755 --- a/Meta/run.py +++ b/Meta/run.py @@ -510,9 +510,15 @@ def setup_audio_backend(config: Configuration): capture_output=True, encoding="utf-8", ).stdout - if "-audiodev id=sdl" in qemu_audio_help: + if qemu_audio_help == "": + qemu_audio_help = run( + [str(config.qemu_binary), "-audiodev", "help"], + capture_output=True, + encoding="utf-8", + ).stdout + if "sdl" in qemu_audio_help: config.audio_backend = "sdl" - elif "-audiodev id=pa" in qemu_audio_help: + elif "pa" in qemu_audio_help: config.audio_backend = "pa,timer-period=2000" if config.audio_backend is not None: