VSP-17: host-side convolution for audio DSP streams (dsp.rs) #23
No reviewers
Labels
No labels
accessibility
benchmark
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
task-claim
telemetry
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/monte-alt--vesper!23
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-23"
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?
@thefafu on GitHub · 2026-11-30 18:20 UTC · original
thefafu:vsp-17-dsp-convolution→main· +830 −24 · 1 files · 50 commits · closed without mergingSummary
VSP-17(linked Task Claim issue: #21). Fixes #6.crates/vesper-hle/src/modules/dsp.rs(its unit tests included). Convolution streams used to complete with silent output, so sounds a title routes through them (phone calls, TVs, radios, voices under water) were mute.Activation:
XDspActivatereads the impulse response the title hands over with a checked copy (ReadProcessMemoryon the own process), so a bad pointer refuses the filter instead of faulting. The IR is in the coprocessor's partitioned frequency-domain layout:framescomplex bins of a2 * framesFFT, without the Nyquist bin;[k * frames, k * frames + 2 * frames)of the filter;Each partition's first
framestime samples are rebuilt and kept as a spectrum.Submit: uniformly partitioned overlap-add convolution per channel, with the command's linear gain ramp. Blocks can be interleaved or deinterleaved (option 2). The input is copied out first, so in-place blocks work. Non-finite samples become 0, and the output is held to [-1, 1].
No audio-thread stalls:
frames + 1unique bins of real signals are multiplied, in split real/imaginary runs that vectorize.Fallback: a convolution stream whose filter is unusable passes its input through with the command's gains (one warning per stream, at most 16).
VESPER_DSP_CONVOLUTION=0does the same for every stream. FFT/IFFT transform streams stay silent as before.Basis: follows the GPL-3.0-or-later host convolution of the lineage this project descends from (used in other forks to restore these voices), reworked as described above.
Cost, measured (
cargo test --release -p vesper-hle --lib modules::dsp::tests::block_cost -- --ignored --nocapture, repo.cargoconfig, 7800X3D). This is the longest filter a connection allows (30 s at 48 kHz, stereo, 1,024 frames: 1,407 partitions):The title's actual stream in game: mono, 1,024 frames, 19 partitions.
AI Assistance Disclosure
main).Benchmark Comparison (Required for perf / GPU / memory changes)
This is an audio change, with no GPU or memory path touched. Hardware: Ryzen 7 7800X3D / 32 GB DDR5-4800 / Radeon RX 9060 XT 16 GB (driver 32.0.32029.2010) / Windows 11 build 26300, inbox D3D12. Profile:
scripts\launch.cmd[1] Series X 1440p Native (HW RT), telemetry on, same restored save. Both drives are on this PR's build:main. 565 pipelines were dropped while being made; the shader cache was cold.Drive 2 spent more time in the dense city. The routes differ, so these numbers describe this hardware rather than compare before and after.
Telemetry reports (cleaned): Drive 1: vesper_report_20261130-205954_e9ac841_clean.zip, Drive 2: vesper_report_20261130-210901_e9ac841_clean.zip.
The bundles the launcher makes still carry the game folder path, the title executable's file name and the machine name in
drive_telemetry.log(onlysummary.txtandenv.txtare redacted). In these copies every file was scrubbed of local paths, machine and user names, the title's folder, executable, id and file names, 64-bit hashes and user ids. Nothing else was changed. I am happy to file the redaction gap as a separate bug againstcollect_telemetry.ps1.Mandatory Verification Checklist
AGENTS.md, stays inside claimedVSP-17files (dsp.rsonly), and avoids the Maintainer Active Queue (ROADMAP.md)cargo xtask policyandcargo test -p xtask --lockedpass cleanly (xtask: 9 passed)cargo clippy --workspace --all-targets --all-features --locked -- -D warningspasses with 0 warnings (also without--all-features)cargo xtask test-fastpasses.cargo test --workspace --locked --no-fail-fast -- --test-threads=1gives 1,268 passed, 48 ignored and 2 failed. The 2 failures are invesper-shader(emit::valu_tests::normalized_buffer_formats_load_correctly_rounded_quotients,emit::valu_tests::normalized_codes_truncate_back_to_themselves, WARP rounding:0x3ca0a0a0vs0x3ca0a0a1) and fail the same way on an untouchedmainhere. The new and existingdsptests: 9 passed, 1 ignored (the cost measurement).VESPER_WAIT_RESIDENT=textures, indirect clamping intact); no rendering code touchedpeer-review-gate) before maintainer review🤖 Generated with Claude Code
@adriaespii on GitHub · 2026-11-30 20:53 UTC · original · approved these changes
Independent 6-point peer review (AGENTS.md Section 6):
ead_samples) and ry_reserve_exact, avoiding faults/OOM on malformed descriptors.
@adriaespii on GitHub · 2026-11-30 20:53 UTC · original · approved these changes
Independent 6-point peer review (AGENTS.md Section 6):
ead_samples) to avoid faulting on unreadable pointers; large allocations use ry_reserve_exact; non-finite IR bins are zeroed (inite()) and output samples are guarded with is_finite() + .clamp(-1.0, 1.0); separate stream.input / stream.output buffers safely handle in-place commands (input == output). No GPU barriers or clamping paths are modified.
@monte-alt on GitHub · 2026-11-30 20:57 UTC · original
thank you for the audio fix. all 9 DSP tests passed here and i found the 19-partition filter in your log. both drives used the patched build, so i’d keep the claim to audio.
Pull request closed