diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-24 21:09:02 +0100 |
|---|---|---|
| committer | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-24 21:09:02 +0100 |
| commit | bc245e5046124941bbdc7bb5c3bd7c739da4e03e (patch) | |
| tree | 5b780fbcbc1dd131ee635980dfe3e996ac72928f /runtime/xma_decoder/README.md | |
| parent | 30450e0e96e1df700bbfa9505433c9b9940e8694 (diff) | |
| parent | 58be9cdf8df9a31bc7f6c068991f1aed381f7f4d (diff) | |
Merge remote-tracking branch 'origin/main' into vcc-tuple-resync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder/README.md')
| -rw-r--r-- | runtime/xma_decoder/README.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/xma_decoder/README.md b/runtime/xma_decoder/README.md index 4a6d5fb10..9db801810 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 |
| @@ -17,3 +15,12 @@ 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 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. |
| 18 | |||
| 19 | ## Use in the runtime | ||
| 20 | |||
| 21 | `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. | ||
| 22 | |||
| 23 | `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. | ||
| 24 | |||
| 25 | Without `cargo`, when that build fails, or with the cl.exe fallback of `scripts/build_runtime.ps1`, XMA voices output silence. | ||
| 26 | Use `-DLEONIDA_REQUIRE_XMA2_DECODER=ON` to require the decoder in a CMake build, as the Windows runtime CI does. | ||