Dynamically load libpulse.so.0 and libasound.so.1 on Linux

By generating stubs using https://github.com/hpvb/dynload-wrapper we
can dynamically load libpulse and libasound on systems where it is available.
Both are still a build-time requirement but no longer a run-time dependency.

For maintenance purposes the wrappers should not need to be re-generated
unless we want to bump pulse or asound to an incompatible version. It is
unlikely we will want to do this any time soon.

This closes #20978
This commit is contained in:
Hein-Pieter van Braam-Stewart 2021-02-16 16:19:03 +01:00
parent cb64f2d96b
commit 09f82fa6ea
12 changed files with 19778 additions and 5 deletions

View file

@ -233,6 +233,10 @@ Error AudioDriverPulseAudio::init_device() {
}
Error AudioDriverPulseAudio::init() {
if (initialize_pulse()) {
return ERR_CANT_OPEN;
}
active = false;
thread_exited = false;
exit_thread = false;