Files
AnyPS5/core/libs/prx/libScePad
e0b0f2b91d fix(pad): send a DualSense haptics report once two blocks are buffered
The 10.672 ms timer took a block only when it fired, so audio arriving in
blocks smaller than 32 haptic frames (16 from a 256-frame legacy port)
regularly found fewer than 32 frames and the report was skipped; catching
up after falling behind sent two reports back to back and left a ~21 ms
hole. The controller, asked to queue only 16 frames, then ran dry, and
the haptics dropped out about once per second on hardware.

The stream thread now waits on a condition variable until two blocks are
buffered and sends one, so reports follow the audio clock, and report
0x32 asks the controller to queue 64 frames (21 ms) to absorb Bluetooth
jitter and the difference between the title's rate and the controller's
crystal. Closing the stream wakes the waiting thread before the join.

Co-authored-by: seradavid <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 21:46:45 +01:00
..