also looking at this
feat(audio): add verified AAC-LC encoding and reject invalid prototype output
#918
10 files
+318
-471
| @@ -0,0 +1,34 @@ | ||
| 1 | name: Native AAC-LC | |
| 2 | on: | |
| 3 | push: | |
| 4 | branches: [feat/aac-mp4-recording] | |
| 5 | pull_request: | |
| 6 | paths: ['packages/audio/src/encoding/*aac*', 'packages/video/src/codecs/audio/aac_encoder.zig', '.github/workflows/native-aac.yml'] | |
| 7 | permissions: | |
| 8 | contents: read | |
| 9 | jobs: | |
| 10 | aac: | |
| 11 | strategy: | |
| 12 | fail-fast: false | |
| 13 | matrix: | |
| 14 | os: [ubuntu-24.04, ubuntu-24.04-arm] | |
| 15 | zig: ['0.15.2', 'master'] | |
| 16 | runs-on: ${{ matrix.os }} | |
| 17 | steps: | |
| 18 | - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | |
| 19 | - uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 | |
| 20 | with: | |
| 21 | version: ${{ matrix.zig }} | |
| 22 | - name: Build pinned standalone codec | |
| 23 | run: | | |
| 24 | git clone https://github.com/mstorsjo/fdk-aac.git /tmp/fdk-aac | |
| 25 | git -C /tmp/fdk-aac checkout --detach 716f4394641d53f0d79c9ddac3fa93b03a49f278 | |
| 26 | cmake -S /tmp/fdk-aac -B /tmp/fdk-build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON | |
| 27 | cmake --build /tmp/fdk-build -j 2 | |
| 28 | sudo cmake --install /tmp/fdk-build | |
| 29 | sudo ldconfig | |
| 30 | - name: Check header boundary and Zig lifecycle | |
| 31 | run: | | |
| 32 | cc -std=c11 -Wall -Wextra -Werror $(pkg-config --cflags fdk-aac) -c packages/audio/src/encoding/native_aac.c -o /tmp/home-aac.o | |
| 33 | zig test packages/audio/src/encoding/native_aac_test.zig /tmp/home-aac.o -lc -L /usr/local/lib -lfdk-aac | |
| 34 | zig test packages/audio/src/encoding/aac_encoder.zig | |