Audio DSP: compute mono convolutions, so TVs, phone calls and reverb are heard #1491
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1491"
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 fxceless/victory-fork. Originally posted by Omnicrash on 2026-11-27T16:54:10Z.
The 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. Fixes fxceless/victory-fork#1470.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
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.