From 0f957c53c84d655f2e99677d407cf2bbe1832de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 22 Aug 2022 17:10:21 +0400 Subject: audio: exit(1) if audio backend failed to be found or initialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you specify a known backend but it isn't compiled in, or failed to initialize, you get a simple warning and the "none" backend as a fallback, and QEMU runs happily: $ qemu-system-x86_64 -audiodev id=audio,driver=dsound audio: Unknown audio driver `dsound' audio: warning: Using timer based audio emulation ... Instead, QEMU should fail to start: $ qemu-system-x86_64 -audiodev id=audio,driver=dsound audio: Unknown audio driver `dsound' $ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1983493 Signed-off-by: Marc-AndrĂ© Lureau Reviewed-by: Volker RĂ¼melin Message-Id: <20220822131021.975656-1-marcandre.lureau@redhat.com> --- audio/audio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/audio.h') diff --git a/audio/audio.h b/audio/audio.h index b5e17cd218..27e67079a0 100644 --- a/audio/audio.h +++ b/audio/audio.h @@ -170,7 +170,7 @@ void audio_sample_from_uint64(void *samples, int pos, void audio_define(Audiodev *audio); void audio_parse_option(const char *opt); -void audio_init_audiodevs(void); +bool audio_init_audiodevs(void); void audio_legacy_help(void); AudioState *audio_state_by_name(const char *name); -- cgit v1.2.3