Skip to content
Snippets Groups Projects
Commit 82806320 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

pulseaudio: drop pactl call

It's unnecessary (pa_context_connect will fail in this case) and not
reliable (it's a TOCTOU race).

Refs #52717

Change-Id: I52bb9b3f4234f5a95ce0c05d3b4f0c398093360c
parent f77ffc92
No related branches found
No related tags found
No related merge requests found
......@@ -393,10 +393,11 @@ AudioLayer* AudioPreference::createAudioLayer()
#if HAVE_PULSE
if (audioApi_ == PULSEAUDIO_API_STR) {
if (system("pactl info > /dev/null") == 0)
try {
return new PulseLayer(*this);
else
WARN("pulseaudio daemon not running, falling back to ALSA");
} catch (const std::runtime_error &e) {
WARN("Could not create pulseaudio layer, falling back to ALSA");
}
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment