Repository navigation
feat(pad): bridge controller audio haptics to motor rumble - #5448
Conversation
|
Checked the overlap warning in a separate Windows Release integration using GCC 15.2: this PR at d182fe2, main 0aa4cb1, #4789 at 5031432, and #5198 at 79dae11. For #5021, I reconciled only its relevant CMake linking change, not its AOT implementation or dependency stack.
All 12 audio/controller tests passed in 6.04 seconds. An integration-only regression snapshots haptic PCM, then overwrites the source buffer and sets gain to zero before Push: motors still receive the captured signal and the main output stays silent. Bypassing captured gain makes that regression fail; restoring it passes. These changes remain on a local integration branch; this PR's source head is unchanged. Linux/macOS, physical controller output on this combined build, and new title gameplay were not tested. Proposed merge order: keep this PR rumble-only and merge it first, with the other PRs retaining the reconciliation above when rebased. Would the authors of #4789, #5021 and #5198 prefer a different order? No functional dependency is required, but I will update Depends on once an order is agreed. |
Co-Authored-By: Claude <noreply@anthropic.com>
|
Checked on Linux (build + Added as our own commits on your branch:
Merging once the full Build (Windows) is green. |
d182fe2 to
7956950
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
What
Convert controller vibration PCM into Xbox-compatible motor rumble when a DualSense audio device is absent. The two channels' RMS energy sets large/small motor intensity; near-silence is ignored and output expires after 80 ms. Regular vibration remains separate, with the stronger intensity used per motor on non-PS5 controllers. DualSense waveform routing and controller-speaker fallback are retained.
Supersedes closed #2467. Main already includes #2032's speaker muting; this adds the rumble bridge. No duplicate rumble implementation was found. The overlap bot flags #4789 (SDL initialization/include), #5021 (platform-specific audio library linking), and #5198 (captured PCM/gain in the mixer). These are independent changes; merge-order coordination with their authors is still pending. A separate local integration check reconciles both includes, retains libScePad in both platform link branches, and combines captured gain with haptic/speaker routing. This PR does not include those other implementations. Motor intensity approximates waveform energy and is peak-held while impulses remain active. Per-user/multi-controller routing follows the existing single-controller limitation.
Tested
Separate overlap integration on Windows GCC15.2: PR5448 + main 0aa4cb1 + PR4789 5031432 + PR5198 79dae11, with only PR5021 platform-link reconciliation, passed 12/12 audio/controller tests (6.04 s). A new integration-only regression verifies captured haptic PCM/gain drives motors without speaker leakage; bypassing captured gain fails and restoring it passes. This validation is not a build of the unchanged isolated PR head; Linux/macOS and new title gameplay were not tested.
Windows, MinGW-w64 GCC 15.2: 6/6 focused tests passed on today's current-main integration build: audio_out2_pad_mix, audio_out2_port_layouts, audio_out2_port_buffers, audio_out2_latency, audio_out2_timing and guest_pad (3.70 seconds). Bridge sources match that build after ignoring comments/whitespace. The integration includes separate 4K output edits and additional layout assertions excluded from this PR. The exact isolated contribution was not freshly rebuilt.
Earlier isolated rebase on main ba2a0a3 built audio/pad/video libraries and passed the same six tests.
Earlier Windows Silksong PPSA12544 01.000.010 gameplay on Ryzen 7700X/RX 7900 XT with an Xbox controller: the user confirmed working rumble. That was the earlier runtime; no new gameplay validation is claimed.
Contribution conventions and whitespace checks passed. Full suite, Linux and physical DualSense audio not tested. No proprietary files included.
Checklist