feat(hle): add XMA2 overlap carry/resume, ApuHeapGetState, and APU PCM/Opus pitch conversion #629
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!629
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-629"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@chefulano on GitHub · 2026-12-05 20:27 UTC · original
chefulano:feat/xma2-carry-opus-pcm-resampler→main· +667 −48 · 3 files · 1 commits · openTitles chaining XMA2 contexts across voice handoffs or connecting to
xapu.dllfor sample-rate/pitch conversion (DECODE_CONVERT_OPUS,CONVERT_PCM) or querying APU heap occupancy (ApuHeapGetState) previously hit missing overlap state, unimplemented processing kinds (E_NOTIMPL), or missing heap accounting.This PR ports the audio/APU improvements from
gamingwithhomie/larp(1250552) cleanly ontomain:crates/victory-formats/src/xma.rs,crates/victory-hle/src/modules/audio.rs): addsxma::Carry+Decoder::carry()/Decoder::resume()for chaining XMA2 overlap across contexts, refill recovery when contexts resume, andApuHeapGetStatetracking cached vs non-cached allocations.crates/victory-hle/src/modules/apu.rs): implementsDECODE_CONVERT_OPUSandCONVERT_PCMwith linear pitch resampling (0.125..=8.0with per-frame ramp),FLUSH/RESET_DECODER/DEINTERLEAVED_INPUThandling, andOUTPUT_READY/NEED_MORE_INPUT/MORE_OUTPUT_AVAILABLEstate reporting onmain's synchronous APU path.Queue check
main's synchronousXApuEnqueueCommandexecution model so it carries no unmerged dependencies and can merge in either order. Also cleanly compatible with #508 (merged Opus PCM scratch reuse).Checks
cargo xtask policy— pass (368 files ok)cargo test -p xtask— 11/11 passedcargo test -p victory-formats -- xma(native Linux) — 20/20 passed, 5 ignored (includes newcarry_and_resume_round_trip_and_validate_inputs)cargo check --locked --release --target x86_64-pc-windows-msvc -p victory-formats -p victory-hle -p victory --tests— passcargo clippy --no-deps --locked --release --target x86_64-pc-windows-msvc -p victory-formats -p victory-hle --all-targets— 0 new warningsPKG=victory-hle ./build.sh test --lib -- modules::audio::— 9/9 passed (includes newheap_state_counts_each_heap)PKG=victory-hle ./build.sh test --lib -- modules::apu::— 3/3 passed (includes newconvert_pcm_and_decode_convert_opus_resample_and_flush)DECODE_OPUSconnections (converter: None); new conversion paths activate only when a title connects withDECODE_CONVERT_OPUSorCONVERT_PCM.Created with Gemini 4 Neon in T3 Code.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.