chad.dll!XDspSubmitCommand: convolution output is stubbed to silence; port the host convolver from VIctory #3332 / Vice-Tay #293 #534

Open
opened 2026-11-27 17:41:44 +00:00 by Dome5881 · 2 comments
Dome5881 commented 2026-11-27 17:41:44 +00:00 (Migrated from github.com)
Contributor

Imported from LooperSalty/AnyXboxX. Originally posted by Dome5881 on 2026-11-27T17:41:44Z.


Steps to reproduce

  1. anyxboxx run --game-dir <package> --override "VICTORY_LOG=victory_hle::modules::dsp=debug" with a title that connects to the audio DSP (chad.dll) and activates convolution streams.
  2. Play any audio the title routes only through a convolution stream (a fully wet effect, with no dry path next to it).

Expected result and actual result

Expected: XDspSubmitCommand writes the input block convolved with the stream's impulse response to the output buffer.

Actual: third_party/victory/crates/victory-hle/src/modules/dsp.rs writes zeros to every output block and returns S_OK, so anything routed only through a convolution stream is silent. Nothing is logged when it happens.

Our copy comes from Vice-Tay a252348 (2026-11-26). Vice-Tay merged a host convolver a day later, so we never got it.

Log or compatibility report

INFO  victory_hle::modules::dsp: audio DSP connected base_length=393216 ir_seconds=30 max_streams=128 max_channels=1
DEBUG victory_hle::modules::dsp: audio DSP stream activated kind=1 options=0 frames=1024 channels=1

Windows and Python version

Windows 11 Pro 10.0.26200. Python not involved (VIctory path, Rust).


Existing fix

  • VIctory #3332 (open) builds on #240 / #2483 (host convolver). It handles the title's IR layout: it drops the trailing marker partition and re-windows the half-overlapping partitions. It also adds stereo IRs, the slot leak on refused activations, a [begin, end] gain ramp, and finite and clamped output.
  • Vice-Tay #293 (merged, e45051af) ports #3332 and adds bounded IR reads and staged input for in-place blocks. It is opt-in (VICTORY_DSP_CONVOLUTION=1) until the comparison asked for in Vice-Tay #259 is done.

The symptom is also tracked in VIctory #3545 and Vice-Tay #259.

Independent confirmation of the IR layout

Before finding #3332, I measured the layout separately: I logged the XDspActivate descriptors on a Series X profile session and dumped the IR buffers locally.

  • Every stream is kind = 1, channels = 1, options = 0, frames = 1024. ir_floats is between 40960 and 212992, and gains are always [1.0, 1.0]. All streams are driven from one thread at 46.9 commands/s (48000 / 1024).
  • The last partition starts with 0xFFFFACE1, followed by small integer pairs. Same as #3332.
  • Partition p is the unnormalised real FFT of the window [h[(p-1)F .. pF], h[pF .. (p+1)F]], stored as bins 0..F in (re, im) pairs, with no Nyquist slot. The first half of window p matches the second half of window p-1 with correlation 1.000. Same finding as #3332.
  • Scale is unity: decoded responses peak at 0.8-1.0, so no normalisation is needed.
  • Using the partitions directly as kernels applies every segment twice, one block apart. I saw it as a copy of the signal 2F samples (42.7 ms) behind the original, with a strong cepstral peak at exactly 42.7 ms in the output and none in the input. #3332 describes the same double count as crackle at block boundaries.

I cross-checked with my own implementation, which decodes each segment to time and rebuilds [zeros(F), segment] kernels for overlap-save. On IR and input buffers dumped from the title, it matches direct convolution with the decoded response to a relative error of 3e-7 to 2e-6. In the title, audio that was silent under the stub plays clean. It costs about 36 µs per block for the longest IR (102 segments). I am not proposing it over #293. It only serves as an independent check of the layout.

Open question: where the response starts

Both readings take the same h out of the windows, but they place it one block apart.

  • #3332 keeps the first half of each window, so partition p contributes segment p - 1. As I read its convolver, the response then starts one block (21.3 ms at 1024 frames) after the input. I haven't run it to confirm.
  • Keeping the second half starts it with no extra delay.

Without reference output from console hardware I can't say which one the hardware does. For fully wet routes it doesn't matter audibly; for reverb sends it moves the pre-delay by one block. Worth a comment in the code either way.

Done when

  • Vice-Tay #293 is ported into third_party/victory per rule 10: Source: and Co-authored-by: lines for its authors (#240, #2483, #3332, #293), and the THIRD_PARTY.md rows updated.
  • Convolution is on by default for anyxboxx run (VICTORY_DSP_CONVOLUTION=1 in the launch profiles, or the default flipped in code).
  • The DSP tests from #3332 (the_title_s_ir_layout_convolves_exactly, convolution_through_the_api_returns_wet_audio) pass in our CI.
  • The IR layout and the open question above are written up in docs/ as measured findings.
<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6651743423 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/issues/534). Originally posted by [Dome5881](https://github.com/Dome5881) on 2026-11-27T17:41:44Z. --- ### Steps to reproduce 1. `anyxboxx run --game-dir <package> --override "VICTORY_LOG=victory_hle::modules::dsp=debug"` with a title that connects to the audio DSP (`chad.dll`) and activates convolution streams. 2. Play any audio the title routes only through a convolution stream (a fully wet effect, with no dry path next to it). ### Expected result and actual result Expected: `XDspSubmitCommand` writes the input block convolved with the stream's impulse response to the output buffer. Actual: `third_party/victory/crates/victory-hle/src/modules/dsp.rs` writes zeros to every output block and returns `S_OK`, so anything routed only through a convolution stream is silent. Nothing is logged when it happens. Our copy comes from Vice-Tay `a252348` (2026-11-26). Vice-Tay merged a host convolver a day later, so we never got it. ### Log or compatibility report ```text INFO victory_hle::modules::dsp: audio DSP connected base_length=393216 ir_seconds=30 max_streams=128 max_channels=1 DEBUG victory_hle::modules::dsp: audio DSP stream activated kind=1 options=0 frames=1024 channels=1 ``` ### Windows and Python version Windows 11 Pro 10.0.26200. Python not involved (VIctory path, Rust). --- ### Existing fix - [VIctory #3332](https://github.com/Marvisak/VIctory/pull/3332) (open) builds on #240 / #2483 (host convolver). It handles the title's IR layout: it drops the trailing marker partition and re-windows the half-overlapping partitions. It also adds stereo IRs, the slot leak on refused activations, a `[begin, end]` gain ramp, and finite and clamped output. - [Vice-Tay #293](https://github.com/TaynanGT/Vice-Tay/pull/293) (merged, `e45051af`) ports #3332 and adds bounded IR reads and staged input for in-place blocks. It is opt-in (`VICTORY_DSP_CONVOLUTION=1`) until the comparison asked for in Vice-Tay #259 is done. The symptom is also tracked in [VIctory #3545](https://github.com/Marvisak/VIctory/issues/3545) and [Vice-Tay #259](https://github.com/TaynanGT/Vice-Tay/issues/259). ### Independent confirmation of the IR layout Before finding #3332, I measured the layout separately: I logged the `XDspActivate` descriptors on a Series X profile session and dumped the IR buffers locally. - Every stream is `kind = 1`, `channels = 1`, `options = 0`, `frames = 1024`. `ir_floats` is between 40960 and 212992, and `gains` are always `[1.0, 1.0]`. All streams are driven from one thread at 46.9 commands/s (48000 / 1024). - The last partition starts with `0xFFFFACE1`, followed by small integer pairs. Same as #3332. - Partition `p` is the unnormalised real FFT of the window `[h[(p-1)F .. pF], h[pF .. (p+1)F]]`, stored as bins `0..F` in `(re, im)` pairs, with no Nyquist slot. The first half of window `p` matches the second half of window `p-1` with correlation 1.000. Same finding as #3332. - Scale is unity: decoded responses peak at 0.8-1.0, so no normalisation is needed. - Using the partitions directly as kernels applies every segment twice, one block apart. I saw it as a copy of the signal `2F` samples (42.7 ms) behind the original, with a strong cepstral peak at exactly 42.7 ms in the output and none in the input. #3332 describes the same double count as crackle at block boundaries. I cross-checked with my own implementation, which decodes each segment to time and rebuilds `[zeros(F), segment]` kernels for overlap-save. On IR and input buffers dumped from the title, it matches direct convolution with the decoded response to a relative error of 3e-7 to 2e-6. In the title, audio that was silent under the stub plays clean. It costs about 36 µs per block for the longest IR (102 segments). I am not proposing it over #293. It only serves as an independent check of the layout. ### Open question: where the response starts Both readings take the same `h` out of the windows, but they place it one block apart. - #3332 keeps the first half of each window, so partition `p` contributes segment `p - 1`. As I read its convolver, the response then starts one block (21.3 ms at 1024 frames) after the input. I haven't run it to confirm. - Keeping the second half starts it with no extra delay. Without reference output from console hardware I can't say which one the hardware does. For fully wet routes it doesn't matter audibly; for reverb sends it moves the pre-delay by one block. Worth a comment in the code either way. ### Done when - [ ] Vice-Tay #293 is ported into `third_party/victory` per rule 10: `Source:` and `Co-authored-by:` lines for its authors (#240, #2483, #3332, #293), and the THIRD_PARTY.md rows updated. - [ ] Convolution is on by default for `anyxboxx run` (`VICTORY_DSP_CONVOLUTION=1` in the launch profiles, or the default flipped in code). - [ ] The DSP tests from #3332 (`the_title_s_ir_layout_convolves_exactly`, `convolution_through_the_api_returns_wet_audio`) pass in our CI. - [ ] The IR layout and the open question above are written up in `docs/` as measured findings.
akimfomin commented 2026-11-27 21:46:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LooperSalty/AnyXboxX. Originally posted by akimfomin on 2026-11-27T21:46:14Z.


I checked the Vice-Tay #293 DSP patch against exact AnyXboxX main bebcfb1. With the three runtime paths prefixed by third_party/victory/, git apply --check --index and an actual apply in an isolated checkout both passed. The resulting dsp.rs and new dsp_convolve.rs match the merged donor exactly. modules/mod.rs keeps AnyXboxX's existing changes and picks up the module declaration. I left out the donor's fork documentation.

This gives the assignee a small import boundary. Start with the three runtime files and the Rule 10 credits, then run cargo test --locked -p victory-hle dsp from third_party/victory on Windows. I verified source application and did not run the receiver's tests. For rollout, I'd evaluate the default separately: Vice-Tay deliberately kept #293 opt-in while the same-dialogue check was open. A generated impulse plus an overlapping input/output block can cover the host path without title data; the console-side delay question remains open.

PortBridge checked the patch with Codex. The convolver and original reports remain credited to their authors.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7228738668 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/issues/534#issuecomment-7228738668). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-27T21:46:14Z. --- I checked the [Vice-Tay #293](https://github.com/TaynanGT/Vice-Tay/pull/293) DSP patch against exact AnyXboxX main [`bebcfb1`](https://github.com/LooperSalty/AnyXboxX/commit/bebcfb104aebbcb081a2b2f2233d5c3c009a4250). With the three runtime paths prefixed by `third_party/victory/`, `git apply --check --index` and an actual apply in an isolated checkout both passed. The resulting `dsp.rs` and new `dsp_convolve.rs` match the [merged donor](https://github.com/TaynanGT/Vice-Tay/commit/e45051afa41b76bba1bcd0c439384b3660f93255) exactly. `modules/mod.rs` keeps AnyXboxX's existing changes and picks up the module declaration. I left out the donor's fork documentation. This gives the assignee a small import boundary. Start with the three runtime files and the Rule 10 credits, then run `cargo test --locked -p victory-hle dsp` from `third_party/victory` on Windows. I verified source application and did not run the receiver's tests. For rollout, I'd evaluate the default separately: Vice-Tay deliberately kept #293 opt-in while [the same-dialogue check](https://github.com/TaynanGT/Vice-Tay/issues/259#issuecomment-7223886025) was open. A generated impulse plus an overlapping input/output block can cover the host path without title data; the console-side delay question remains open. [PortBridge](https://github.com/akimfomin/PortBridge) checked the patch with Codex. The convolver and original reports remain credited to their authors.
akimfomin commented 2026-11-27 22:13:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LooperSalty/AnyXboxX. Originally posted by akimfomin on 2026-11-27T22:13:29Z.


The Windows synthetic check now passes on the imported DSP source. I compiled the two exact revisions from the earlier apply check using a small harness that calls the real DSP connect, activate and submit functions and uses native Windows memory reads. The old source returns zero even with VICTORY_DSP_CONVOLUTION=1. The import keeps the old behavior with the switch unset or 0. With 1, the in-place output matches all 512 expected samples and the completion ticket. All 10 checks passed, and the old source fails the same wet-output assertion as a negative control. Reproducer and exact results

Would you take the three-file import with convolution opt-in as the first PR, and handle a default change separately? The evidence supports that narrower scope. The receiving workspace and launcher still need their normal Windows checks, and the console pre-delay remains unknown. I can hand over the pinned recipe from PortBridge if you already intend to take the import. The convolver authors retain their credit. Testing was Codex-assisted.

Update with the receiving project’s Windows bindings: the same import passes 13 checks using AnyXboxX’s original export registry and its locked windows-sys and tracing dependencies. All five CHAD.DLL exports resolve, and the enabled in-place test still matches. This checks the DSP and registration slice. The full receiving build and the opt-in decision are still open. Exact source and test result

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7229136745 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/issues/534#issuecomment-7229136745). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-27T22:13:29Z. --- The Windows synthetic check now passes on the imported DSP source. I compiled the two exact revisions from the earlier apply check using a small harness that calls the real DSP connect, activate and submit functions and uses native Windows memory reads. The old source returns zero even with `VICTORY_DSP_CONVOLUTION=1`. The import keeps the old behavior with the switch unset or `0`. With `1`, the in-place output matches all 512 expected samples and the completion ticket. All 10 checks passed, and the old source fails the same wet-output assertion as a negative control. [Reproducer and exact results](https://github.com/akimfomin/PortBridge/tree/4bee4dccb04995c86a5c9a31ab83967fabff8e9b/audit/evidence/decision-followthrough/anyxboxx-dsp) Would you take the three-file import with convolution opt-in as the first PR, and handle a default change separately? The evidence supports that narrower scope. The receiving workspace and launcher still need their normal Windows checks, and the console pre-delay remains unknown. I can hand over the pinned recipe from PortBridge if you already intend to take the import. The convolver authors retain their credit. Testing was Codex-assisted. Update with the receiving project’s Windows bindings: the same import passes 13 checks using AnyXboxX’s original export registry and its locked `windows-sys` and `tracing` dependencies. All five `CHAD.DLL` exports resolve, and the enabled in-place test still matches. This checks the DSP and registration slice. The full receiving build and the opt-in decision are still open. [Exact source and test result](https://github.com/akimfomin/PortBridge/tree/fd6757f1f7a53a5781c776e0c9340e8bf3a479d9/audit/evidence/decision-followthrough/anyxboxx-dsp/native-bindings)
Sign in to join this conversation.
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
LooperSalty/AnyXboxX#534
No description provided.