fix(audioout): isolate haptic audio and add Xbox rumble fallback #2467

Closed
joelfernandes23 wants to merge 1 commit from upstream-pr/2467 into main
joelfernandes23 commented 2026-10-09 22:18:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by joelfernandes23 on 2026-10-09T22:18:23Z.


What

Silksong's haptic PCM played as a buzz through the main speakers when no DualSense audio device was available. Keep vibration samples out of normal audio and approximate their two-channel RMS energy as large/small motor rumble on non-PS5 controllers. Ignore near-silence and use an 80 ms hold/deadline to preserve short impulses and stop rumble when audio stops. Ordinary rumble commands remain separate; the stronger intensity wins. Controller speaker audio retains its fallback, and an available DualSense audio device retains its waveform path.

Related/dependency: #2032 already implements the audio-leak suppression and its output regression. This PR overlaps that portion and adds the motor-rumble bridge. The overlapping changes need consolidation before merge; the no-overlap checklist item remains unchecked.

Limitations: motor intensity approximates haptic waveform energy. The bridge uses the emulator's single controller; per-user/multi-controller routing is not implemented. Intensities are peak-held while the stream remains active.

Tested

  • Windows, Ryzen 7 7700X, Radeon RX 7900 XT, Xbox controller: Hollow Knight: Silksong (PPSA12544, 01.000.010). Disabling in-game vibration isolated the original buzz. After installing this update and restarting, the player reported that it worked.
  • Local Windows build: all six audio tests and guest_pad passed. Added checks cover silent main output for mono/stereo haptic ports, motor energy conversion independent of speaker samples, automatic expiry, and preservation of ordinary rumble.
  • tools/check_conventions.py --base origin/main: passes.
  • Applied cleanly to main at 64fe7439. Runtime tests used the local Silksong build; Linux and physical DualSense output were not tested.

Checklist

  • Based on current main; no other open PR implements the same functions — based on 64fe7439, but #2032 overlaps the audio-leak fix as described above.
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt — no new system API stubs.
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source — no new third-party code.
  • Generic behaviour, not specific to one title
  • Depends on: #2032; overlapping audio routing/test changes need consolidation before merge.
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4806456057 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2467). Originally posted by [joelfernandes23](https://github.com/joelfernandes23) on 2026-10-09T22:18:23Z. --- ### What Silksong's haptic PCM played as a buzz through the main speakers when no DualSense audio device was available. Keep vibration samples out of normal audio and approximate their two-channel RMS energy as large/small motor rumble on non-PS5 controllers. Ignore near-silence and use an 80 ms hold/deadline to preserve short impulses and stop rumble when audio stops. Ordinary rumble commands remain separate; the stronger intensity wins. Controller speaker audio retains its fallback, and an available DualSense audio device retains its waveform path. Related/dependency: #2032 already implements the audio-leak suppression and its output regression. This PR overlaps that portion and adds the motor-rumble bridge. The overlapping changes need consolidation before merge; the no-overlap checklist item remains unchecked. Limitations: motor intensity approximates haptic waveform energy. The bridge uses the emulator's single controller; per-user/multi-controller routing is not implemented. Intensities are peak-held while the stream remains active. ### Tested - Windows, Ryzen 7 7700X, Radeon RX 7900 XT, Xbox controller: Hollow Knight: Silksong (PPSA12544, 01.000.010). Disabling in-game vibration isolated the original buzz. After installing this update and restarting, the player reported that it worked. - Local Windows build: all six audio tests and `guest_pad` passed. Added checks cover silent main output for mono/stereo haptic ports, motor energy conversion independent of speaker samples, automatic expiry, and preservation of ordinary rumble. - `tools/check_conventions.py --base origin/main`: passes. - Applied cleanly to main at `64fe7439`. Runtime tests used the local Silksong build; Linux and physical DualSense output were not tested. ### Checklist - [ ] Based on current `main`; no other open PR implements the same functions — based on `64fe7439`, but #2032 overlaps the audio-leak fix as described above. - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) — no new system API stubs. - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source — no new third-party code. - [x] Generic behaviour, not specific to one title - [x] Depends on: #2032; overlapping audio routing/test changes need consolidation before merge. - [x] AI-assisted: yes
popcoder565 commented 2026-10-09 22:47:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T22:47:03Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 50b92bbb, merged onto main 09a3462e in one build with #2473, which current main needs to build on Windows, and 3 other new PRs.

  • This PR's tests pass: audio_out2_pad_mix, audio_out2_port_layouts and guest_pad.
  • Full ctest in that build: 546 of 546.

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090560336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2467#issuecomment-6090560336). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T22:47:03Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `50b92bbb`, merged onto `main` 09a3462e in one build with #2473, which current `main` needs to build on Windows, and 3 other new PRs. - This PR's tests pass: `audio_out2_pad_mix`, `audio_out2_port_layouts` and `guest_pad`. - Full ctest in that build: 546 of 546. No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
github-actions[bot] commented 2026-10-09 22:48:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:48:45Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090578575 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2467#issuecomment-6090578575). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T22:48:45Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!2467
No description provided.