XAudio2: write decoded XMA samples directly into interleaved PCM #521
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/526"
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?
Imported from ivall/xcl. Originally posted by wileyGray on 2026-11-24T01:20:00Z.
XAudio2 requests PCM16 from the XMA decoder. The decoder previously popped each sample from a channel queue into a float buffer, then allocated a second buffer and converted the entire result. Related to #459.
What is in it
Tested
cargo build --locked --workspace --offlinepassed.cargo test --workspace -- --test-threads=4oncc09012reported 680 passed, 0 failed, 41 ignored, including the end-to-end test title. Two GPU tests reported SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.508a0c7andcc09012.decode_buffer_i16(packet_data, true)call. Built both module versions withrustc --edition=2021 -O --test, pinned to the same logical CPU, warmed the decoder, then alternated baseline and patch order over 15 runs of 350 decodes per fixture. Inputs and outputs usedstd::hint::black_box.Regression run
Retail regression evidence needed. A tester with any unpacked Xbox Series title can supply this pair; the title need not use XMA. In clean checkouts of upstream
508a0c74d7c0and PR headcc09012b7e0b, run the following in each checkout, using the same game folder, machine and duration:Please attach the two generated
xcl-smokeblocks to this PR, labeled main and PR, with the title version. Only the text output is needed. I can then update this section with the credited results.For comparison, the repository's synthetic title passed all 50 checks on both commits with
xcl run <game> -- --hello(exit 0). Unmodifiedscripts/smoke.ps1launched the same fixture without its required--helloargument and recorded exit 1, one crash and zero device removals on both commits.Not tested
AI use
Imported from ivall/xcl. Originally posted by DTsordas on 2026-11-24T09:44:17Z.
Test report for #526 at
cc09012: AMD RDNA4 (native wave64), WindowsTested
cargo build --workspaceandcargo test --workspace -- --test-threads=4atcc09012: 680 passed, 0 failed, 41 ignored, 0 SKIPPED. The two tests skipped on the RTX 4080 for lack of wave64 (gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware) ran and passed here.hle::xma2tests pass, including the extendedsurround_5_1_interleaves_three_streams_and_isolates_channelsanddecodes_xma2_and_xma1_bitstreams_matching_ffmpeg.cc09012merged into current main077ce40(no conflicts):cargo test -p xcl --lib hle::xma2::7 passed, 0 failed.Not tested
xcl-smokeblocks; the PR check still needs them.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T02:57:14Z.
Regression run of
cc09012bon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 90 % of
main's frames, 99 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:43:22Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:41Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:39:46Z.
Triage (#1607) – head
cc09012No open or merged PR changes
Decoder::drain_synchronizedordecode_buffer_i16; #2683 avoids copies in xaudio2.rs, not in the XMA decoder. Readdrain_synchronizedagainst main's: it skips the same encoder-delay frames, interleaves in the same stream/channel order and drainsmin(emit_total + trim_tail, len)per FIFO as before, so output should be unchanged. The new 5.1 check compares packet-by-packet PCM16 with the float decode. No problems found in the diff (the failing check is the description check, which asks for the regression run).Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.