nativeaudio

audio playback for Go
Log | Files | Refs | README | LICENSE

commit a4d54b52ff25999a2e0a71a39b8fd2ec135a353c
parent 71cb9ce45f1126d155f9915976ae916a40841f09
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Sat, 19 Sep 2026 14:56:54 -0300

ci: install the libav headers the linked backend needs

Every cgo-enabled Linux target now compiles against libavcodec,
libavformat, libavutil and libswresample.

Diffstat:
M.github/workflows/ci.yml | 22++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -23,11 +23,17 @@ jobs: go-version-file: go.mod # ffmpeg is the decode backend on Linux, so it is required rather than - # optional there. The ALSA headers are for the play subpackage, whose - # audio backend reaches them through pkg-config. + # optional there. The libav headers are what the linked backend builds + # against; the binary is still needed, both for the no-cgo fallback and + # for the tests that generate fixtures with it. The ALSA headers are for + # the play subpackage, whose audio backend reaches them through + # pkg-config. - name: Install Linux dependencies if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install -y ffmpeg pkg-config libasound2-dev + run: >- + sudo apt-get update && sudo apt-get install -y + ffmpeg pkg-config libasound2-dev + libavcodec-dev libavformat-dev libavutil-dev libswresample-dev - name: Install ffmpeg (macOS) if: runner.os == 'macOS' @@ -107,9 +113,13 @@ jobs: with: go-version-file: go.mod - # Needed to build the play subpackage for linux with cgo enabled. - - name: Install ALSA headers - run: sudo apt-get update && sudo apt-get install -y pkg-config libasound2-dev + # ALSA is for the play subpackage; the libav headers are for the linked + # ffmpeg backend, which every cgo-enabled Linux target now builds. + - name: Install build dependencies + run: >- + sudo apt-get update && sudo apt-get install -y + pkg-config libasound2-dev + libavcodec-dev libavformat-dev libavutil-dev libswresample-dev # The core package is meant to build anywhere, including targets with # no native decoder and no cgo, where it falls back to ffmpeg.