XAudio2: an XMA voice keeps the decoder's channels beyond 8 #1277

Merged
emirduran707 merged 1 commit from upstream-pr/1287 into main 2026-11-30 02:48:42 +00:00
emirduran707 commented 2026-11-24 14:20:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T14:20:42Z.


The XMA2 decoder accepts up to 16 channels (xma2::MAX_CHANNELS), and a decoded XMA voice is created with the decoder's channel count. But pcm16_for_rate clamped it to 8, so a voice with 9–16 channels got an 8-channel PCM voice. Each decoded frame still carried all its channels: with 10 channels, XAudio2 read every 10 samples as 1.25 frames of 8 channels, so the channels landed on the wrong speakers, drifted every frame, and the buffer played 1.25 times too long (2 times with 16 channels). XAudio2's limit is XAUDIO2_MAX_AUDIO_CHANNELS (64). On this machine, xaudio2_9 created plain PCM16 voices of 9, 10, 12, 16, 32 and 64 channels that played at the right length, and refused 65 (XAUDIO2_E_INVALID_CALL).

pcm16_for_rate now clamps to 1–64. The XMA voice's state takes the decoder's channel count too: the silence that stands in for an undecodable buffer is sized from it, and with 8 there Windows refused the submit of a 10-channel voice. Silent fallback voices and Opus voices still use 8, as before.

What is in it

  • crates/xcl/src/hle/xaudio2.rs:
    • the clamp, and the channel count of the XMA branch;
    • test pcm16_keeps_up_to_64_channels, which needs no device;
    • test xma_voice_keeps_the_decoders_ten_channels, which skips without an audio device. It uses an XMA2WAVEFORMATEX with 10 channels in 5 streams: the voice reports 10 channels, and an undecodable buffer submits.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo test --workspace -- --test-threads=4 on fe5b1f3: 743 passed, 0 failed, 41 ignored; no SKIPPED GPU tests (the audio tests ran; an audio device is present)
  • without the change: pcm16_keeps_up_to_64_channels left: (8, 16, 768000), right: (10, 20, 960000); with it both new tests pass

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19650 MB

this PR:

xcl-smoke v1
commit: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1515 (PresentX 1515)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19512 MB

Not tested

  • A title with an XMA voice of more than 8 channels; the smoke title's run is a regression check only.
  • An XMA voice of more than 8 channels whose decoder fails to start still gets the 8-channel silent voice.
  • With #1249 (saturating avg_bytes in the same function): the two merge cleanly, and its test's 8-channel case is unchanged by the 64 clamp; not run together.
  • NVIDIA and Intel GPUs.

AI use

  • Claude Code with Claude Opus 5.5: found the problem, wrote the change, the tests and this description; I reviewed the diff and ran the tests and smoke runs above.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5473934279 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T14:20:42Z. --- The XMA2 decoder accepts up to 16 channels (`xma2::MAX_CHANNELS`), and a decoded XMA voice is created with the decoder's channel count. But `pcm16_for_rate` clamped it to 8, so a voice with 9–16 channels got an 8-channel PCM voice. Each decoded frame still carried all its channels: with 10 channels, XAudio2 read every 10 samples as 1.25 frames of 8 channels, so the channels landed on the wrong speakers, drifted every frame, and the buffer played 1.25 times too long (2 times with 16 channels). XAudio2's limit is `XAUDIO2_MAX_AUDIO_CHANNELS` (64). On this machine, xaudio2_9 created plain PCM16 voices of 9, 10, 12, 16, 32 and 64 channels that played at the right length, and refused 65 (`XAUDIO2_E_INVALID_CALL`). `pcm16_for_rate` now clamps to 1–64. The XMA voice's state takes the decoder's channel count too: the silence that stands in for an undecodable buffer is sized from it, and with 8 there Windows refused the submit of a 10-channel voice. Silent fallback voices and Opus voices still use 8, as before. **What is in it** - `crates/xcl/src/hle/xaudio2.rs`: - the clamp, and the channel count of the XMA branch; - test `pcm16_keeps_up_to_64_channels`, which needs no device; - test `xma_voice_keeps_the_decoders_ten_channels`, which skips without an audio device. It uses an `XMA2WAVEFORMATEX` with 10 channels in 5 streams: the voice reports 10 channels, and an undecodable buffer submits. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo test --workspace -- --test-threads=4` on fe5b1f3: 743 passed, 0 failed, 41 ignored; no SKIPPED GPU tests (the audio tests ran; an audio device is present) - without the change: `pcm16_keeps_up_to_64_channels` `left: (8, 16, 768000)`, `right: (10, 20, 960000)`; with it both new tests pass **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1541 (PresentX 1541) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19650 MB ``` this PR: ``` xcl-smoke v1 commit: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1515 (PresentX 1515) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19512 MB ``` **Not tested** - A title with an XMA voice of more than 8 channels; the smoke title's run is a regression check only. - An XMA voice of more than 8 channels whose decoder fails to start still gets the 8-channel silent voice. - With #1249 (saturating `avg_bytes` in the same function): the two merge cleanly, and its test's 8-channel case is unchanged by the 64 clamp; not run together. - NVIDIA and Intel GPUs. **AI use** - Claude Code with Claude Opus 5.5: found the problem, wrote the change, the tests and this description; I reviewed the diff and ran the tests and smoke runs above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
futurepro62 commented 2026-11-24 15:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:34:39Z.


Full-suite run, since this PR has no test report yet. Tested exact head fe5b1f3 (on its base 47efa2e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 743 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: pcm16_keeps_up_to_64_channels, xma_voice_keeps_the_decoders_ten_channels.

Not tested

  • AMD, a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7134602894 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1287#issuecomment-7134602894). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:34:39Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `fe5b1f3` (on its base `47efa2e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **743 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `pcm16_keeps_up_to_64_channels`, `xma_voice_keeps_the_decoders_ten_channels`. **Not tested** - AMD, a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
thehollowedone commented 2026-11-24 15:05:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T14:35:10Z.


Independent native 16-channel XMA check on fe5b1f3 and its parent 930e8b4. Windows 11 build 26300, system XAudio2 2.9, Rust 1.99.1 MSVC, debug.

I submitted a synthetic XMA2 packet that produces no decoded samples to a muted voice. With the PR, the native voice reported 16 input channels and queued 15,360 zero PCM bytes for 480 frames. XAudio2 consumed exactly 480 source frames, drained the queue, and XCL freed the fallback buffer. The parent consumed 480 frames too, but its voice had eight channels and queued only 7,680 bytes. The stock 10-channel test also passed without a skip.

This checks native playback of synthetic fallback silence. Valid multichannel XMA decoding and retail audio were outside this run. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch fixture and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7134617201 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1287#issuecomment-7134617201). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-24T14:35:10Z. --- Independent native 16-channel XMA check on [`fe5b1f3`](https://github.com/ivall/xcl/commit/fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a) and its parent [`930e8b4`](https://github.com/ivall/xcl/commit/930e8b49c1c2ec683d22c724a398b39111cd0e56). Windows 11 build 26300, system XAudio2 2.9, Rust 1.99.1 MSVC, debug. I submitted a synthetic XMA2 packet that produces no decoded samples to a muted voice. With the PR, the native voice reported 16 input channels and queued 15,360 zero PCM bytes for 480 frames. XAudio2 consumed exactly 480 source frames, drained the queue, and XCL freed the fallback buffer. The parent consumed 480 frames too, but its voice had eight channels and queued only 7,680 bytes. The stock 10-channel test also passed without a skip. This checks native playback of synthetic fallback silence. Valid multichannel XMA decoding and retail audio were outside this run. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch fixture and drafted this report.
S1m0ne1997 commented 2026-11-25 15:07:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T14:46:26Z.


Test report for fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a (this PR's head), for #1607.

Tested

  • NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, rustc 1.100.0 (0ef1bc386 2026-11-09) x86_64-pc-windows-msvc, debug.
  • cargo build --workspace, then cargo test --workspace -- --test-threads=4 at the head: 743 passed, 0 failed, 41 ignored.
  • SKIPPED (2): gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64).

Regression run (retail title, scripts/smoke.ps1 -Seconds 60, release; main built from the commit in its block, this PR from its head with no changes to crates/, both run with the scripts/smoke.ps1 of main, which hashes the name of the game folder)

main:

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1599 (PresentX 1599)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16384 MB

this PR:

xcl-smoke v1
commit: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1655 (PresentX 1655)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19596 MB

Not tested

  • AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only.

AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.

<!-- greyfinch-sync:ivall/xcl:comment:7165792351 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7165792351). Originally posted by [S1m0ne1997](https://github.com/S1m0ne1997) on 2026-11-25T14:46:26Z. --- Test report for `fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a` (this PR's head), for #1607. **Tested** - NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, `rustc 1.100.0 (0ef1bc386 2026-11-09)` `x86_64-pc-windows-msvc`, debug. - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4` at the head: **743 passed, 0 failed, 41 ignored**. - SKIPPED (2): `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64). **Regression run** (retail title, `scripts/smoke.ps1 -Seconds 60`, release; `main` built from the commit in its block, this PR from its head with no changes to `crates/`, both run with the `scripts/smoke.ps1` of `main`, which hashes the name of the game folder) main: ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1599 (PresentX 1599) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16384 MB ``` this PR: ``` xcl-smoke v1 commit: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1655 (PresentX 1655) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19596 MB ``` **Not tested** - AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only. *AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.*
DavidM1911 commented 2026-11-26 02:08:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:17:35Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179627661 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7179627661). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T01:17:35Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
Decodere commented 2026-11-27 13:08:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T13:08:36Z.


Independent desktop NVIDIA verification of PR #1287 at head fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a (1 commit; exact parent & merge-base: 47efa2ecea0a12934719ae69b81930cf02a4b1c3, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (fe5b1f3b)

Command Result
cargo test --release -p xcl --lib -- --nocapture pcm16_keeps_up_to_64_channels xma_voice_keeps_the_decoders_ten_channels (3 consecutive runs) 2 passed; 0 failed; 0 ignored; 719 filtered out × 3 (0.07s, 0.05s, 0.06s, 0 skipped; live Windows 11 system XAudio2 2.9 created 10-channel XMA2 voice and accepted undecodable silence buffer with S_OK)
cargo test --release -p xcl --lib -- --nocapture hle::xaudio2:: (3 consecutive runs) 11 passed; 0 failed; 0 ignored; 710 filtered out × 3 (0.15s, 0.15s, 0.13s, 0 skipped; live Windows 11 system XAudio2 2.9 + Media Foundation MSOpusDecoder + hle::xma2)
cargo build --release -p xcl Clean build (1m 17s, exit 0, 0 new warnings in xaudio2.rs)

Paired quiet 60 s retail smoke (title: 29640639)

(Note: scripts/smoke.ps1 at 47efa2ec predates 9683e7a6 and printed the local folder basename on title:; replaced below with the standard 9683e7a6 title hash 29640639, with all measured fields verbatim.)

Exact parent & merge-base (47efa2ecea0a12934719ae69b81930cf02a4b1c3, cached baseline on the same machine):

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1527 (PresentX 1527)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14723 MB

PR #1287 (fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a):

xcl-smoke v1
commit: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1495 (PresentX 1495)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14709 MB

Limits of coverage

  • pcm16_keeps_up_to_64_channels, xma_voice_keeps_the_decoders_ten_channels, and the full hle::xaudio2:: suite (11/11, 0 skipped) passed 3/3 against the host's live Windows 11 system XAudio2 2.9 runtime, directly verifying 10-channel XMA2 voice creation (GetVoiceDetails InputChannels == 10) and undecodable-buffer silence framing (S_OK) without hitting the no-audio-device skip path.
  • The unit test submits an undecodable packet rather than decoding audible >8-channel XMA2 streams end-to-end, and the 60 s retail smoke confirms live XAudio2 runtime stability (0 device removals, 0 crashes, steady 60 Hz) without confirming whether this title instantiates >8-channel XMA2 voices; single-run frame/commit delta vs. the cached parent reflects normal startup variance.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7219111461 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7219111461). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T13:08:36Z. --- Independent desktop NVIDIA verification of **PR #1287** at head `fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a` (`1` commit; exact parent & merge-base: `47efa2ecea0a12934719ae69b81930cf02a4b1c3`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted tests & build (`fe5b1f3b`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib -- --nocapture pcm16_keeps_up_to_64_channels xma_voice_keeps_the_decoders_ten_channels` (3 consecutive runs) | `2 passed; 0 failed; 0 ignored; 719 filtered out` × 3 (`0.07s`, `0.05s`, `0.06s`, `0` skipped; live Windows 11 system XAudio2 2.9 created 10-channel XMA2 voice and accepted undecodable silence buffer with `S_OK`) | | `cargo test --release -p xcl --lib -- --nocapture hle::xaudio2::` (3 consecutive runs) | `11 passed; 0 failed; 0 ignored; 710 filtered out` × 3 (`0.15s`, `0.15s`, `0.13s`, `0` skipped; live Windows 11 system XAudio2 2.9 + Media Foundation `MSOpusDecoder` + `hle::xma2`) | | `cargo build --release -p xcl` | Clean build (`1m 17s`, exit `0`, `0` new warnings in `xaudio2.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) *(Note: `scripts/smoke.ps1` at `47efa2ec` predates `9683e7a6` and printed the local folder basename on `title:`; replaced below with the standard `9683e7a6` title hash `29640639`, with all measured fields verbatim.)* Exact parent & merge-base (`47efa2ecea0a12934719ae69b81930cf02a4b1c3`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1527 (PresentX 1527) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14723 MB ``` PR #1287 (`fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a`): ``` xcl-smoke v1 commit: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1495 (PresentX 1495) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14709 MB ``` ### Limits of coverage - `pcm16_keeps_up_to_64_channels`, `xma_voice_keeps_the_decoders_ten_channels`, and the full `hle::xaudio2::` suite (`11/11`, `0` skipped) passed `3/3` against the host's live Windows 11 system XAudio2 2.9 runtime, directly verifying 10-channel XMA2 voice creation (`GetVoiceDetails` `InputChannels == 10`) and undecodable-buffer silence framing (`S_OK`) without hitting the no-audio-device skip path. - The unit test submits an undecodable packet rather than decoding audible >8-channel XMA2 streams end-to-end, and the 60 s retail smoke confirms live XAudio2 runtime stability (`0` device removals, `0` crashes, steady 60 Hz) without confirming whether this title instantiates >8-channel XMA2 voices; single-run frame/commit delta vs. the cached parent reflects normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-28 13:55:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T13:55:36Z.


merge-check claim
head: fe5b1f3b81

<!-- greyfinch-sync:ivall/xcl:comment:7240284080 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7240284080). Originally posted by [throny](https://github.com/throny) on 2026-11-28T13:55:36Z. --- merge-check claim head: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a
throny commented 2026-11-28 14:12:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T14:12:27Z.


merge-check
base: e13d6250
head: fe5b1f3b81
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2132 passed, 10 failed, 48 ignored (26 SKIPPED lines). The 10 failures are the ones main itself has at e13d6250 on this GPU (#3093: the nine since #2959 and, since today, gpu::dxil::msaa_tests::direct_msaa_loads_precede_get_dimensions), the same set with and without this PR; base alone: 2130 passed, 10 failed, 48 ignored.
review: the bounds hold: the decoder's channel count is limited to 16 by its stream configuration, the PCM conversion clamps the channel count, the Opus path refuses more than 8, the silence fallback is clamped to the buffer limits, and the 8-channel clamp of the info block is overridden only in the decoded path. Minor: the new test asserts only success for the undecodable buffer, not the byte count of ten channels, and it returns without a SKIPPED line when there is no audio device.
performance: only voices with more than 8 channels, which now get 10 to 16 channels of PCM; negligible.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7240497439 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7240497439). Originally posted by [throny](https://github.com/throny) on 2026-11-28T14:12:27Z. --- merge-check base: e13d6250 head: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2132 passed, 10 failed, 48 ignored (26 SKIPPED lines). The 10 failures are the ones main itself has at e13d6250 on this GPU (#3093: the nine since #2959 and, since today, gpu::dxil::msaa_tests::direct_msaa_loads_precede_get_dimensions), the same set with and without this PR; base alone: 2130 passed, 10 failed, 48 ignored. review: the bounds hold: the decoder's channel count is limited to 16 by its stream configuration, the PCM conversion clamps the channel count, the Opus path refuses more than 8, the silence fallback is clamped to the buffer limits, and the 8-channel clamp of the info block is overridden only in the decoded path. Minor: the new test asserts only success for the undecodable buffer, not the byte count of ten channels, and it returns without a SKIPPED line when there is no audio device. performance: only voices with more than 8 channels, which now get 10 to 16 channels of PCM; negligible. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
jsalzy commented 2026-11-30 01:40:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T01:40:38Z.


merge-check claim
head: fe5b1f3b81

<!-- greyfinch-sync:ivall/xcl:comment:7266345361 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7266345361). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T01:40:38Z. --- merge-check claim head: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a
relativespace2K commented 2026-11-30 01:45:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T01:45:11Z.


Test report only. I withdraw my merge-check claim: this head already has a merge check and another claim, and the two slots are theirs.

head: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a, test-merged onto main 53e85fb1, merge clean (one file, crates/xcl/src/hle/xaudio2.rs).

Tested

  • AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build.
  • cargo build --workspace -> ok, then cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2790 passed, 6 failed, 49 ignored.
  • Failing, the same five that fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there): gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in --test gpu_two_pass_cache_e2e, so five tests give six failures).
  • Both new tests passed. pcm16_keeps_up_to_64_channels and, on this machine, xma_voice_keeps_the_decoders_ten_channels; run alone with --nocapture it prints no "skipping: no audio device", so the mastering voice and the 10-channel source voice were really created rather than silently skipped.
  • 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused.

Not tested: a release build, a game run.

AI use: DeepSeek Harness coding agent, model DeepSeek V4.1 Flash (test merge, build, suite, log reading).

<!-- greyfinch-sync:ivall/xcl:comment:7266410010 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7266410010). Originally posted by [relativespace2K](https://github.com/relativespace2K) on 2026-11-30T01:45:11Z. --- Test report only. I withdraw my merge-check claim: this head already has a merge check and another claim, and the two slots are theirs. head: `fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a`, test-merged onto `main` `53e85fb1`, merge clean (one file, `crates/xcl/src/hle/xaudio2.rs`). **Tested** - AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. - `cargo build --workspace` -> ok, then `cargo test --workspace --no-fail-fast -- --test-threads=4` -> **2790 passed, 6 failed, 49 ignored**. - Failing, the same five that fail on base `53e85fb1` alone (2788 passed, 6 failed, 49 ignored there): `gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form`, `gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk`, `hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline`, `ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it`, `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (in `--test gpu_two_pass_cache_e2e`, so five tests give six failures). - Both new tests passed. `pcm16_keeps_up_to_64_channels` and, on this machine, `xma_voice_keeps_the_decoders_ten_channels`; run alone with `--nocapture` it prints no "skipping: no audio device", so the mastering voice and the 10-channel source voice were really created rather than silently skipped. - 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused. **Not tested**: a release build, a game run. AI use: DeepSeek Harness coding agent, model DeepSeek V4.1 Flash (test merge, build, suite, log reading).
jsalzy commented 2026-11-30 01:45:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T01:45:27Z.


merge-check claim head: fe5b1f3

yo im already checking this

<!-- greyfinch-sync:ivall/xcl:comment:7266413632 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7266413632). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T01:45:27Z. --- > merge-check claim head: [fe5b1f3](https://github.com/xcl-dev/xcl/commit/fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a) yo im already checking this
jsalzy commented 2026-11-30 01:53:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T01:53:41Z.


merge-check
base: 9335bc0d86
head: fe5b1f3b81
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2803 passed, 1 failed, 50 ignored; SKIPPED: 28 (22 no wave64 on this GPU; 3 per-lane form refused (#1426 semantics); 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (standin.rs:459, left (0, 1, 1), right (0, 0, 1)), fails on base too. Main alone at 9335bc0: 2800 passed, 2 failed, 50 ignored: the same standin test, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (gpu_two_pass_cache_e2e.rs:472, in its warm child run), which passed on the merge result and does not involve audio. The PR's two new tests (pcm16_keeps_up_to_64_channels, xma_voice_keeps_the_decoders_ten_channels) pass; the voice test returns early without an audio device and its output is captured, so this run does not show whether it reached CreateSourceVoice.
review: no blocking finding; whole diff read (one file). pcm16_for_rate now clamps to 1..64 instead of 1..8. The only caller that can pass more than 8 is the XMA decoder path (create_decoded_voice with dec.channels(), up to 16 from the stream configuration); xma_info and opus_format still clamp to 8 and the Opus decoder refuses more than 8, so the PCM fallback and Opus voices are unchanged. The XmaInfo handed to the decoder takes the decoder's channel count, so silence for an undecodable buffer is sized in the voice's own frames. Minor: the voice test asserts only S_OK for the undecodable buffer, not the silence's length, and it skips with eprintln instead of a SKIPPED line. Overlap to settle: #1437 (open) routes pcm16_for_rate through a 1..8 channel clamp; the two disagree on the limit, so whichever merges second has to pick one. Not a duplicate.
performance: none for voices of up to 8 channels; voices of 9 to 16 channels now carry all their channels (up to 2x the PCM of the old 8-channel clamp).
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.

<!-- greyfinch-sync:ivall/xcl:comment:7266529594 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1287#issuecomment-7266529594). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T01:53:41Z. --- merge-check base: 9335bc0d86dbdc17c0e322bca617f35375b3e289 head: fe5b1f3b81b1ef64242c7ad1a8ef5f075b68d74a merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2803 passed, 1 failed, 50 ignored; SKIPPED: 28 (22 no wave64 on this GPU; 3 per-lane form refused (#1426 semantics); 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (standin.rs:459, left (0, 1, 1), right (0, 0, 1)), fails on base too. Main alone at 9335bc0: 2800 passed, 2 failed, 50 ignored: the same standin test, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (gpu_two_pass_cache_e2e.rs:472, in its warm child run), which passed on the merge result and does not involve audio. The PR's two new tests (pcm16_keeps_up_to_64_channels, xma_voice_keeps_the_decoders_ten_channels) pass; the voice test returns early without an audio device and its output is captured, so this run does not show whether it reached CreateSourceVoice. review: no blocking finding; whole diff read (one file). pcm16_for_rate now clamps to 1..64 instead of 1..8. The only caller that can pass more than 8 is the XMA decoder path (create_decoded_voice with dec.channels(), up to 16 from the stream configuration); xma_info and opus_format still clamp to 8 and the Opus decoder refuses more than 8, so the PCM fallback and Opus voices are unchanged. The XmaInfo handed to the decoder takes the decoder's channel count, so silence for an undecodable buffer is sized in the voice's own frames. Minor: the voice test asserts only S_OK for the undecodable buffer, not the silence's length, and it skips with eprintln instead of a SKIPPED line. Overlap to settle: #1437 (open) routes pcm16_for_rate through a 1..8 channel clamp; the two disagree on the limit, so whichever merges second has to pick one. Not a duplicate. performance: none for voices of up to 8 channels; voices of 9 to 16 channels now carry all their channels (up to 2x the PCM of the old 8-channel clamp). verdict: safe to merge hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1277
No description provided.