diff --git a/app/streaming/audio/renderers/sdlaud.cpp b/app/streaming/audio/renderers/sdlaud.cpp index 6a4efe06..1dc1e049 100644 --- a/app/streaming/audio/renderers/sdlaud.cpp +++ b/app/streaming/audio/renderers/sdlaud.cpp @@ -13,33 +13,6 @@ SdlAudioRenderer::SdlAudioRenderer() { SDL_assert(!SDL_WasInit(SDL_INIT_AUDIO)); -#ifdef HAVE_MMAL - // HACK: PulseAudio on Raspberry Pi suffers from horrible underruns, - // so switch to ALSA if we detect that we're on a Pi. We need to - // actually set a bogus PULSE_SERVER so it doesn't try to get smart on us - // and find PA anyway. SDL_AUDIODRIVER=pulseaudio can override this logic. - if (qgetenv("SDL_AUDIODRIVER").toLower() != "pulseaudio") { - QFile file("/proc/cpuinfo"); - if (file.open(QIODevice::ReadOnly | QFile::Text)) { - QTextStream textStream(&file); - if (textStream.readAll().contains("Raspberry Pi")) { - SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, - "Avoiding PulseAudio on Raspberry Pi"); - - qputenv("PULSE_SERVER", ""); - if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0) { - SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, - "ALSA failed; falling back to default"); - qunsetenv("PULSE_SERVER"); - } - else { - SDL_QuitSubSystem(SDL_INIT_AUDIO); - } - } - } - } -#endif - if (SDL_InitSubSystem(SDL_INIT_AUDIO) != 0) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_InitSubSystem(SDL_INIT_AUDIO) failed: %s",