Permalink
Browse files

Linux SDL 1.x: Sick and tired of PulseAudio-related crashes and hangs.

Use ALSA by default. Most Linux distros include an ALSA plugin to plug
into PulseAudio anyway and make that default, use that.
  • Loading branch information...
joncampbell123 committed Dec 9, 2017
1 parent 86319ce commit efc85d2b181127ba9e5047689578fd3628fee09a
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/gui/sdlmain.cpp
@@ -5136,6 +5136,14 @@ int main(int argc, char* argv[]) {
putenv("SDL_AUDIODRIVER=directsound");
}
#endif
#if defined(LINUX) && !defined(C_SDL2)
/* SDL 1.x and PulseAudio sucks (crashes, hangs).
* Most Linux distros have ALSA and an ALSA plugin that connects to pulseaudio. Use that. */
if (getenv("SDL_AUDIODRIVER") == NULL) {
LOG(LOG_GUI, LOG_DEBUG)("Linux: using alsa audio driver");
putenv("SDL_AUDIODRIVER=alsa");
}
#endif
#ifdef WIN32
/* Windows Vista/7/8/10 DPI awareness. If we don't tell Windows we're high DPI aware, the DWM will

0 comments on commit efc85d2

Please sign in to comment.