diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 13:17:55 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 13:17:55 -0500 |
| commit | bbf861fbb4ea51ca18cd6f372797111984b6f8aa (patch) | |
| tree | 81ac99a1a6d61841cca3562fab529cf38348c73f /runtime/opus_decoder/README.md | |
| parent | 4645a3f62a7655ce69b930da70bdc1a858d1d0a1 (diff) | |
| parent | bdbc7e9236465c5d6a1305de6edd3fc09c2d6fd9 (diff) | |
Merge main into fix/depth16-quantise-fallback
runtime/CMakeLists.txt: main added the heavy_pipeline_cache, pipeline_cache_journal and compile_helper tests where this branch adds depth24_fragment; both sides are kept.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/opus_decoder/README.md')
| -rw-r--r-- | runtime/opus_decoder/README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/runtime/opus_decoder/README.md b/runtime/opus_decoder/README.md new file mode 100644 index 000000000..2b516e496 --- /dev/null +++ b/runtime/opus_decoder/README.md | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # Opus decoder C ABI | ||
| 2 | |||
| 3 | This crate exposes a C ABI around the BSD-3-Clause `opus-pure` package for the console audio | ||
| 4 | decoder (`xapu.dll`). The command protocol lives in `runtime/shims/xapu_chad.cpp`; this crate only | ||
| 5 | decodes one Opus packet into interleaved f32 PCM, resets the decoder, and (for tests) encodes a | ||
| 6 | synthetic tone. | ||
| 7 | |||
| 8 | ## Build | ||
| 9 | |||
| 10 | ```sh | ||
| 11 | cargo fmt --manifest-path runtime/opus_decoder/Cargo.toml -- --check | ||
| 12 | cargo test --manifest-path runtime/opus_decoder/Cargo.toml --locked | ||
| 13 | cargo build --release --manifest-path runtime/opus_decoder/Cargo.toml --locked | ||
| 14 | ``` | ||
| 15 | |||
| 16 | `runtime/CMakeLists.txt` builds this crate for `x86_64-pc-windows-msvc` at configure time when | ||
| 17 | `cargo` is on `PATH` and links it into `gta6rt` and `xapu_chad_test` with | ||
| 18 | `LEONIDA_HAVE_OPUS_DECODER` defined. The first build fetches `opus-pure` from crates.io. Set | ||
| 19 | `CARGO_NET_OFFLINE=true` for a configure that uses only the local Cargo cache. | ||
| 20 | |||
| 21 | Without `cargo`, when the build fails, or with the `cl.exe` fallback of `scripts/build_runtime.ps1`, | ||
| 22 | the XAPU path stays silent. Use `-DLEONIDA_REQUIRE_OPUS_DECODER=ON` to require the decoder in a | ||
| 23 | CMake build. | ||
| 24 | |||
| 25 | To link an already-built `leonida_opus_decoder.lib` without invoking `cargo` during CMake | ||
| 26 | configure, pass `-DLEONIDA_OPUS_DECODER_LIB=<path>`. | ||
| 27 | |||
| 28 | ## Facts and credit | ||
| 29 | |||
| 30 | The `xapu.dll` command protocol (connect input/output, per-stream command budget, activate / | ||
| 31 | process / reset / deactivate, result order) follows Marvisak/VIctory | ||
| 32 | `crates/victory-hle/src/modules/apu.rs` (GPL-3.0-or-later), which this repository already credits for | ||
| 33 | other modules. `opus-pure` is BSD-3-Clause and stays a dependency; no code from it is copied. | ||