From 668654098ede4f4801fc7bc2b2bec4070902a4fd Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Jan 2012 15:02:03 +0100 Subject: audio: change default preference order of AO drivers Now PulseAudio is preferred over ALSA, which in turn is preferred over OSS. This should give best results on all systems. On systems with PulseAudio, we will always use it natively, rather than through the suboptimal ALSA emulation (which the default ALSA output is normally redirected to when PulseAudio is active; ALSA hardware devices will not be, but to use those the user must set AO explicitly in any case, so changing the defaults makes no difference). The fallback from ao_pulse to ao_alsa causes no noticeable delay on systems without PulseAudio. On systems with ALSA, we won't attempt to use OSS anymore. Also, move OpenAL above SDL. OpenAL should generally work better than SDL. --- libao2/audio_out.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libao2/audio_out.c b/libao2/audio_out.c index bd06c8fd5f..b1b5c0e901 100644 --- a/libao2/audio_out.c +++ b/libao2/audio_out.c @@ -74,12 +74,15 @@ static const struct ao_driver * const audio_out_drivers[] = { #ifdef CONFIG_COREAUDIO &audio_out_coreaudio, #endif -#ifdef CONFIG_OSS_AUDIO - &audio_out_oss, +#ifdef CONFIG_PULSE + &audio_out_pulse, #endif #ifdef CONFIG_ALSA &audio_out_alsa, #endif +#ifdef CONFIG_OSS_AUDIO + &audio_out_oss, +#endif #ifdef CONFIG_ALSA5 &audio_out_alsa5, #endif @@ -96,20 +99,17 @@ static const struct ao_driver * const audio_out_drivers[] = { #ifdef CONFIG_ESD &audio_out_esd, #endif -#ifdef CONFIG_PULSE - &audio_out_pulse, -#endif #ifdef CONFIG_JACK &audio_out_jack, #endif #ifdef CONFIG_NAS &audio_out_nas, #endif -#ifdef CONFIG_SDL - &audio_out_sdl, -#endif #ifdef CONFIG_OPENAL &audio_out_openal, +#endif +#ifdef CONFIG_SDL + &audio_out_sdl, #endif &audio_out_mpegpes, #ifdef CONFIG_IVTV -- cgit v1.2.3