Audio DSP: compute mono convolutions, so TVs, phone calls and reverb are heard #77
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/trustno1-coder--VIctory-NVIDIA!77
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-77"
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?
@Omnicrash on GitHub · 2026-11-27 16:54 UTC · original
Omnicrash:dsp-convolution→main· +311 −8 · 2 files · 1 commits · merged 2026-11-27 20:07 UTCThe title sends the sound of speakers in the world (TVs, phone calls) through the audio DSP (
chad.dll) alone, and its reverb sends go through it too. The DSP's outputs were zeros, so TVs and phone calls were silent and reverb was dry. This computes the DSP's mono convolutions on the CPU. The same fix as fxceless/victory-fork#1491 (fxceless/victory-fork#1470): the DSP code here is the same file.What is in it
crates/victory-hle/src/modules/dsp/convolve.rs: a uniformly partitioned FFT convolution that reads the title's impulse responses in the coprocessor's layout: blocks of 2048 floats, each the unscaled 2048-point FFT of a 2048-sample window of the response (window k covers samples (k-1)*1024 .. (k+1)*1024), bins 0-1023 interleaved re/im, then a schedule block that starts with0xFFFFACE1. I read the layout from the responses the retail title passes toXDspActivate: under that reading, the time-domain halves of every pair of neighbouring blocks match, across all 21 responses dumped. Streams whose inputs have been silent for a whole response cost nothing.crates/victory-hle/src/modules/dsp.rs: mono convolution streams of 1024-frame blocks get a convolver at activation;XDspSubmitCommandwrites the convolution instead of zeros.VICTORY_DSP_CONVOLVE=0turns it off.VICTORY_DSP_GAINscales the output (default 2, see below).XDspActivate/XDspSubmitCommand.Tested
kind=1, mono, 1024 frames, responses of 19 to 103 windows. All of them were computed (computed=truein the debug log). TVs and phone calls are heard, with their speaker colouring, and reverb comes back.cargo test --locked -p victory-hle --lib: 174 passed, 0 failed, 2 ignored (on this repo's main with the commit on top)Not tested
VICTORY_DSP_GAINchanges it without a rebuild.kind2): the title did not use them, and they still give zeros.AI use
@IdecEddy on GitHub · 2026-11-27 18:57 UTC · original
Works on my PC
Processor AMD Ryzen 9 9950X3D 16-Core Processor (4.30 GHz)
Installed RAM 128 GB (126 GB usable)
Graphics card NVIDIA GeForce RTX 2080 SUPER (8 GB)
AMD Radeon(TM) Graphics (2 GB)
System type 64-bit operating system, x64-based processor