mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 22:44:59 +01:00
fix(ci): build OpenAL Soft with the PipeWire, PulseAudio and ALSA backends, so the Linux game has sound
The Linux job builds OpenAL Soft 1.24.2 from source, but the runner had none of the headers of its audio backends, and OpenAL Soft's CMake leaves out every backend it can't find. The bundled libopenal.so.1 had only OSS, Null, Wave and Loopback. Modern distributions and the Steam Linux Runtime have no /dev/dsp, so the game logged "Failed to obtain audio device" and played nothing, with any Steam Linux Runtime and without one. - install libasound2-dev, libpulse-dev and libpipewire-0.3-dev before building OpenAL Soft - configure it with ALSOFT_REQUIRE_PIPEWIRE/PULSEAUDIO/ALSA, so a missing header fails the build instead of shipping a library without sound The backends are loaded with dlopen at run time (ALSOFT_DLOPEN is on by default), so the bundled library gains no new dependency. Tested by putting an OpenAL Soft 1.24.2 with these backends next to the game from the Steam depot: under Steam Linux Runtime 4.0 the sound works. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
12
.github/workflows/build_bin.yml
vendored
12
.github/workflows/build_bin.yml
vendored
@@ -221,8 +221,13 @@ jobs:
|
||||
| sudo tee /etc/apt/apt.conf.d/80-ci-retries > /dev/null
|
||||
sudo apt-get update
|
||||
|
||||
# libasound2-dev, libpulse-dev and libpipewire-0.3-dev: the headers of OpenAL Soft's audio backends (built below).
|
||||
# Without them it builds with OSS only, which modern distributions and the Steam Linux Runtime don't have: no sound.
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
libasound2-dev \
|
||||
libpulse-dev \
|
||||
libpipewire-0.3-dev \
|
||||
libgl1-mesa-dev \
|
||||
libglew-dev \
|
||||
libglfw3-dev \
|
||||
@@ -249,12 +254,17 @@ jobs:
|
||||
https://github.com/kcat/openal-soft.git \
|
||||
/tmp/openal-soft
|
||||
|
||||
# the backends are loaded with dlopen at run time (ALSOFT_DLOPEN), so the bundled library needs none of them;
|
||||
# REQUIRE makes a missing header fail the build instead of shipping a library without sound
|
||||
cmake \
|
||||
-S /tmp/openal-soft \
|
||||
-B /tmp/openal-soft/build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DALSOFT_EXAMPLES=OFF \
|
||||
-DALSOFT_UTILS=OFF
|
||||
-DALSOFT_UTILS=OFF \
|
||||
-DALSOFT_REQUIRE_PIPEWIRE=ON \
|
||||
-DALSOFT_REQUIRE_PULSEAUDIO=ON \
|
||||
-DALSOFT_REQUIRE_ALSA=ON
|
||||
|
||||
cmake \
|
||||
--build /tmp/openal-soft/build \
|
||||
|
||||
Reference in New Issue
Block a user