diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 18:48:12 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 18:48:12 -0500 |
| commit | fb2afdccc2314d7b5a59fac10e6d6df7f5df35ab (patch) | |
| tree | 9e0b7e2e39b42823f148d135ce781e57fab52155 /runtime/xma_decoder/README.md | |
| parent | 862890c893eb19eb39eb2fd95e7786e42ff4b18c (diff) | |
| parent | 864337351bc11a250db77c2fcdd3ba6f1d0f455f (diff) | |
Merge main into RT-QUEUE18 (#403)
Merged on top of the merge made for #396 (main 507029d1e plus RT-QUEUE35,
RT-ALLOC9 and RT-LIST139). No conflicts.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder/README.md')
| -rw-r--r-- | runtime/xma_decoder/README.md | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/xma_decoder/README.md b/runtime/xma_decoder/README.md index 4a6d5fb10..67341e60a 100644 --- a/runtime/xma_decoder/README.md +++ b/runtime/xma_decoder/README.md | |||
| @@ -6,8 +6,6 @@ Each decoder handle serializes decode calls. The returned PCM block owns its sam | |||
| 6 | 6 | ||
| 7 | The tests build packets in memory; they do not open or contain audio fixtures. The synthetic C++ smoke test verifies the exported ABI and ownership boundary. | 7 | The tests build packets in memory; they do not open or contain audio fixtures. The synthetic C++ smoke test verifies the exported ABI and ownership boundary. |
| 8 | 8 | ||
| 9 | This PR adds the decoder boundary only; the Windows XAudio2 engine/source-voice adapter is a follow-up stage. | ||
| 10 | |||
| 11 | Run: | 9 | Run: |
| 12 | 10 | ||
| 13 | ```powershell | 11 | ```powershell |
| @@ -16,4 +14,15 @@ cargo test --manifest-path runtime/xma_decoder/Cargo.toml --locked | |||
| 16 | cargo build --manifest-path runtime/xma_decoder/Cargo.toml --locked | 14 | cargo build --manifest-path runtime/xma_decoder/Cargo.toml --locked |
| 17 | ``` | 15 | ``` |
| 18 | 16 | ||
| 19 | The C++ smoke test is run by the xma2-decoder workflow with MSVC. It links ws2_32, userenv, and ntdll for Rust's Windows standard library. | 17 | The `xma2-decoder` workflow builds and runs the C++ smoke test with MSVC. It links `ws2_32.lib`, `userenv.lib`, |
| 18 | `ntdll.lib`, and `synchronization.lib` for Rust's Windows standard library. `synchronization.lib` resolves the | ||
| 19 | `WaitOnAddress` and `WakeByAddress*` imports in the Rust static library. | ||
| 20 | |||
| 21 | ## Use in the runtime | ||
| 22 | |||
| 23 | `runtime/CMakeLists.txt` builds this crate for `x86_64-pc-windows-msvc` at configure time when `cargo` is on `PATH` and links it into `gta6rt` and `acphal_test` with `LEONIDA_HAVE_XMA2_DECODER` defined. The first build fetches the pinned `xma` git dependency. Set `CARGO_NET_OFFLINE=true` for a configure that uses only the local Cargo cache. | ||
| 24 | |||
| 25 | `runtime/shims/acphal.cpp` uses `leonida_xma2_decoder_create_hardware` and decodes whole 2048-byte packets, so loop points are rounded to packets. The shim creates a fresh decoder after a loop rewind or a decoder error. | ||
| 26 | |||
| 27 | Without `cargo`, when that build fails, or with the cl.exe fallback of `scripts/build_runtime.ps1`, XMA voices output silence. | ||
| 28 | Use `-DLEONIDA_REQUIRE_XMA2_DECODER=ON` to require the decoder in a CMake build, as the Windows runtime CI does. | ||