[pr-fix][audio] The DSP convolution from Main: phone, headset and TV voices are heard again #702

Open
untried844 wants to merge 1 commit from untried844/Darner:audio-dsp-convolve into post-merge
First-time contributor

What it changes

  • The problem on post-merge: crates/darner-hle/src/modules/dsp.rs says it itself: "The transforms themselves are not computed ... Outputs are silence, so reverb returns are dry." In play, voices the title sends through the DSP's convolution (phone calls, headset radio, the TV) are missing.

This brings the convolution over from Main: crates/darner-simd and crates/darner-hle/src/modules/dsp/convolve.rs as they are there, and dsp.rs with it. The only difference from Main's dsp.rs is a local assert_layout! macro in its tests, which this line does not have elsewhere. No new code beyond that.

How it was tested

  • Tested revision: this commit on post-merge 28a9b42.

  • Commands and results: cargo build --release --locked -p darner: builds. cargo test --release --locked -p darner-simd and -p darner-hle dsp: all pass, 0 failed.

  • Changes a default: yes, for everyone: the DSP's outputs are computed where they were silence.

  • A/B result, same save:

    A (28a9b42) B (this change)
    Voice on a phone call not heard heard

    A second tester (RTX 4070 S) reports the TV's sound back with a build holding this change.

  • Checks run on that revision: cargo build, the tests above. cargo clippy not run.

  • Gameplay: Intel Core i9-13900K · 32 GB DDR5-6400 (2 sticks) · NVIDIA GeForce RTX 4090 24 GB, driver 621.40 · Windows 11 Pro build 26300. Series X profile, 2560x1440 output, DLSS Quality (1712x960 render) and DLAA, HDR on, frame generation 2x, hardware ray tracing.

  • Hardware dependence: likely general (CPU only; DARNER_SIMD_AUDIO=0 takes the scalar loops).

  • Coverage gaps: CPU cost not measured. Only phone calls checked by ear here.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on post-merge (28a9b42).
  • The diff contains no game files, code or assets.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #511 (moves this convolution to worker threads, on Main)
  • Replaces or overlaps: none on post-merge

The change was written with a coding agent (AI-assisted) and run by me in the game.

## What it changes - The problem on `post-merge`: `crates/darner-hle/src/modules/dsp.rs` says it itself: "The transforms themselves are not computed ... Outputs are silence, so reverb returns are dry." In play, voices the title sends through the DSP's convolution (phone calls, headset radio, the TV) are missing. This brings the convolution over from `Main`: `crates/darner-simd` and `crates/darner-hle/src/modules/dsp/convolve.rs` as they are there, and `dsp.rs` with it. The only difference from `Main`'s `dsp.rs` is a local `assert_layout!` macro in its tests, which this line does not have elsewhere. No new code beyond that. ## How it was tested - Tested revision: this commit on `post-merge` `28a9b42`. - Commands and results: `cargo build --release --locked -p darner`: builds. `cargo test --release --locked -p darner-simd` and `-p darner-hle dsp`: all pass, 0 failed. - Changes a default: yes, for everyone: the DSP's outputs are computed where they were silence. - A/B result, same save: | | A (`28a9b42`) | B (this change) | |---|---|---| | Voice on a phone call | not heard | heard | A second tester (RTX 4070 S) reports the TV's sound back with a build holding this change. - Checks run on that revision: `cargo build`, the tests above. `cargo clippy` not run. - Gameplay: Intel Core i9-13900K · 32 GB DDR5-6400 (2 sticks) · NVIDIA GeForce RTX 4090 24 GB, driver 621.40 · Windows 11 Pro build 26300. Series X profile, 2560x1440 output, DLSS Quality (1712x960 render) and DLAA, HDR on, frame generation 2x, hardware ray tracing. - Hardware dependence: likely general (CPU only; `DARNER_SIMD_AUDIO=0` takes the scalar loops). - Coverage gaps: CPU cost not measured. Only phone calls checked by ear here. ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `post-merge` (`28a9b42`). - [x] The diff contains no game files, code or assets. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #511 (moves this convolution to worker threads, on `Main`) - Replaces or overlaps: none on `post-merge` The change was written with a coding agent (AI-assisted) and run by me in the game.
The Merge line has no convolution in the DSP module, so voices the title sends through it (phone calls, headset radio) were not heard as the title mixes them. This brings main's darner-simd crate and dsp/convolve.rs over and wires them into dsp.rs.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'audio-dsp-convolve:untried844-audio-dsp-convolve'
git switch 'untried844-audio-dsp-convolve'

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.

git switch 'post-merge'
git merge --no-ff 'untried844-audio-dsp-convolve'
git switch 'untried844-audio-dsp-convolve'
git rebase 'post-merge'
git switch 'post-merge'
git merge --ff-only 'untried844-audio-dsp-convolve'
git switch 'untried844-audio-dsp-convolve'
git rebase 'post-merge'
git switch 'post-merge'
git merge --no-ff 'untried844-audio-dsp-convolve'
git switch 'post-merge'
git merge --squash 'untried844-audio-dsp-convolve'
git switch 'post-merge'
git merge --ff-only 'untried844-audio-dsp-convolve'
git switch 'post-merge'
git merge 'untried844-audio-dsp-convolve'
git push origin 'post-merge'
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!702
No description provided.