Repository navigation
D3D12 runtime: audio DSP mono convolutions, so TVs, phone calls and reverb are heard - #2604
Open
ItsYusei99 wants to merge 1 commit into
Open
ItsYusei99 wants to merge 1 commit into
ItsYusei99 wants to merge 1 commit into
Conversation
…are heard The title sends the sound of speakers in the world (TVs, phone calls) through the audio DSP alone, and its reverb sends through it too. The DSP's outputs were zeros, so those were silent and reverb was dry. From trustno1-coder/VIctory-NVIDIA eca45ac (GPL-3.0-or-later) (Audio DSP: compute mono convolutions, by Yve) and 9b712a6 (its clippy fix), with the crate and variable names of this tree: mono convolutions of 1024-frame blocks are computed from the impulse responses the title passes to XDspActivate; stereo and 512-frame convolutions and the other transforms still give zeros. LEONIDA_DSP_CONVOLVE=0 turns it off; LEONIDA_DSP_GAIN scales it (default 2). This tree's dsp.rs was the file as it was before that commit (identical after the renames), so the port is the upstream file as it is now. Co-Authored-By: Yve <yve@omnicrash.net> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
Tested
No blocker from my side. AI-assisted (Claude Code). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #2363 (the same DSP in the Vulkan runtime's
runtime/shims/xapu_chad.cpp; this one is the D3D12 runtime'sd3d12/crates/leonida-hle, no file in common)What and why
In the D3D12 runtime the audio DSP (
chad.dll,modules/dsp.rs) answered every stream with zeros. The title sends the sound of speakers in the world (TVs, phone calls) through the DSP alone, and its reverb sends through it too, so those were silent and reverb was dry.This ports trustno1-coder/VIctory-NVIDIA
eca45ac("Audio DSP: compute mono convolutions, so TVs, phone calls and reverb are heard", by Yve, GPL-3.0-or-later) and its clippy follow-up9b712a6, with this tree's crate and variable names:XDspActivateare read as blocks of 2048 floats (the 2048-point FFT of a window of the response), and mono convolutions of 1024-frame blocks are computed (modules/dsp/convolve.rs, new);LEONIDA_DSP_CONVOLVE=0turns it off;LEONIDA_DSP_GAINscales it (default 2, as upstream: the hardware's scaling is not known).This tree's
dsp.rswas byte for byte the upstream file beforeeca45ac(after the victory→leonida renames), so the port is the upstream file as it is now. The original author is credited with aCo-Authored-Byline.Tested
cargo test --locked -p leonida-hle --lib dsp: 4 passed (a_mono_convolution_is_computed,convolution_stream_as_the_title_drives_it,convolve::a_silent_ring_gives_silence,convolve::matches_a_direct_convolution_across_blocks).cargo build --locked --profile diag -p leonida --features diagnostics,dlss,mimallocbuilds, and the title runs with it (Series S profile, DLSS + frame generation 2x). Whether TVs and phone calls are heard has not been listened for in a run yet.GPUs tested: NVIDIA GeForce RTX 4070 12 GB, driver 621.40, Windows 11 Pro 26200
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.docs/design.md(n/a: no translator change).🤖 Generated with Claude Code