From fea2504a377ef707d61601a0cd5c7016e547143b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 7 Nov 2023 22:02:27 -0800 Subject: [PATCH] Prioritize the pipewire audio driver over ALSA ALSA is used very rarely anymore and the pipewire ALSA emulation isn't as good as using pipewire directly. The Pulseaudio emulation is very good, and Pulseaudio is still commonly available on Linux systems, so we'll default to that first and fall back to pipewire if it's not available. We'll finally try ALSA, to handle very old systems. Fixes https://github.com/libsdl-org/SDL/issues/7541 --- src/audio/SDL_audio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index ef93f82817..f8f24c3920 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -30,6 +30,9 @@ static const AudioBootStrap *const bootstrap[] = { #ifdef SDL_AUDIO_DRIVER_PULSEAUDIO &PULSEAUDIO_bootstrap, #endif +#ifdef SDL_AUDIO_DRIVER_PIPEWIRE + &PIPEWIRE_bootstrap, +#endif #ifdef SDL_AUDIO_DRIVER_ALSA &ALSA_bootstrap, #endif @@ -78,9 +81,6 @@ static const AudioBootStrap *const bootstrap[] = { #ifdef SDL_AUDIO_DRIVER_JACK &JACK_bootstrap, #endif -#ifdef SDL_AUDIO_DRIVER_PIPEWIRE - &PIPEWIRE_bootstrap, -#endif #ifdef SDL_AUDIO_DRIVER_OSS &DSP_bootstrap, #endif