audio: Do not prevent pulseaudio from autospawning a server.

This prevents downgrading the audio experience to ALSA on system
running a vanilla pulseaudio configuration that relies on pulseaudio
being able to manage the pulseaudio server itself.

* src/media/audio/pulseaudio/pulselayer.cpp (PulseLayer::PulseLayer)
[PA_CONTEXT_NOAUTOSPAWN]: Replace flags argument value with
PA_CONTEXT_NOFLAGS.
* src/media/audio/pulseaudio/pulselayer.h: Fix typo.

GitLab: #473
Change-Id: I219223dd8a1237a51b3e5bf60d6535518d748b63
This commit is contained in:
Maxim Cournoyer
2021-03-08 13:38:07 -05:00
committed by Sébastien Blin
parent c838727f6c
commit cc7be87b0e
2 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,7 @@ PulseLayer::PulseLayer(AudioPreference& pref)
pa_context_set_state_callback(context_, context_state_callback, this);
if (pa_context_connect(context_, nullptr, PA_CONTEXT_NOAUTOSPAWN, nullptr) < 0)
if (pa_context_connect(context_, nullptr, PA_CONTEXT_NOFLAGS, nullptr) < 0)
throw std::runtime_error("Could not connect pulseaudio context to the server");
// wait until context is ready

View File

@ -119,7 +119,8 @@ public:
~PulseLayer();
/**
* Write data from the ring buffer to the harware and read data from the hardware
* Write data from the ring buffer to the hardware and read data
* from the hardware.
*/
void readFromMic();
void writeToSpeaker();