Audio: resume ended XMA voices when input is refilled #3555
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3555
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3555"
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?
@pablogonz12 on GitHub · 2026-11-27 17:25 UTC · original
pablogonz12:upstream/xma-resume-ended→main· +54 −2 · 1 files · 1 commits · openSummary
An ended XMA voice returned before checking for newly published input. I let it resume when either input becomes valid, while leaving it ended when neither is valid. I credit codec-d/cool_fox for the restart fix.
The whole-block refill change is left to #2444.
Evidence
Not tested on NVIDIA hardware.
Merge Danger
Door: two-way
Blast Radius: XMA audio
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 18:09 UTC · original
All nine native Windows audio tests passed on this PR's
b7fb07b, and its Windows CI passed.I also tested the two fixes together. A synthetic mono voice decodes two packets, drains to the end, and stays quiet while neither input is valid. The refill publishes an empty input 0 and two complete packets in input 1. The same enabled voice resumes and decodes six frames in both builds.
b7fb07bwrites 27 output blocks, including an extra silent block at the switch. Adding #2444 at413cf34produces all 26 expected blocks, including the overlap tail.The tested branch preserves both PR heads and adds the integration regression. All 155 HLE tests, both strict Clippy configurations and the asset policy passed on Windows.
The results support taking both fixes. Next step is for the authors or maintainers to decide which PR carries the integration fixture. Please retain the original Git authors on cherry-pick or rebase. If folding my test into another commit, add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>. AI-assisted with Codex.@oni-swr on GitHub · 2026-11-27 18:11 UTC · original
Independent verification of
b7fb07bc(basemain63bcca43; the PR is a single branch off that base). AI-assisted (Claude Sonnet 5.5); claim: #1633. This adds to the native Windows report above at the same head rather than repeating it.cargo test -p victory-hle --lib: main63bcca43= 152 passed, 0 failed. PR head = 153 passed, 0 failed. The newended_voice_stays_ended_until_input_is_republishedpasses.cargo clippy -p victory-hle --all-targets -- -D warnings: clean.Review notes (no blockers found):
set_field(2, 26, 6, 0)covers six bits, so it also resets bit 31 that the end path sets (set_field(2, 31, 1, 1)), which keeps the two sides symmetrical.Decoder::flushends withreset(), so the comment about the overlap being reset holds.field(2, 0, 26)) and the current-input bit are not reset on resume. If a title republishes the same input without resetting them, the voice would find the input used up and end again. Whether the console behaves like that is unproven; the test only covers a switch to the other input.@cloph-dsp on GitHub · 2026-11-27 19:41 UTC · original
Independent CPU-only verification on Windows / Rust 1.100.0 / MSVC.
b7fb07bcae7fa979ec9920e06b94601b54773da3, merge base63bcca43c6a00a758510398fa43096ce7e4f7df0.cargo test --locked -p victory-hle --lib -- modules::audio::tests::ended_voice_stays_ended_until_input_is_republished --exact --test-threads=1 --quiettest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 152 filtered out, exit 0.git grep -F -c ended_voice_stays_ended_until_input_is_republished 63bcca43 -- .→ exit 1 / 0 hits (test genuinely new); present on PR head.git diff --check 63bcca43 HEAD→ exit 0.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.