When the console is powered off or put into sleep mode during streaming,
the remote will disconnect and report the string "Server shutting down".
This is expected by the user and thus should not be shown as an error
message.
The previous value of `0` caused the PS5 to expect a set of 'trigger status'
values in the 0x19 and 0x1a position, which would have required reading
raw values from the DualSense HID device, since these values are not
reported by the SDL DualSense driver (code that does so can be checked
out from the `trigger-feedback` branch on https://git.sr.ht/~jbaiter/chiaki).
Fortunately this is not neccessary, simply setting the value to `1`
seems to make the PS5 to rely on fallback logic (presumably based on the
L2/R2 value) and games that would otherwise have relied on the trigger
status (Astro's Playroom climbing levels) now work without any problems.
This should enable support for more controllers besides the DS4 and
DualSense, basically any controller supported by SDL that has at least
one touchpad, an accelerometer and a gyroscope.
Older SDL versions have been tested down to 2.0.9. Versions older than
2.0.14 won't have sensors and touchpad support, though.
Setsu is deprecated and remains in-tree for now, but defaults to being
disabled if SDL2 is found and >= 2.0.14. If Setsu is enabled explicitly,
touchpad and sensors are not handled by SDL.
By default, no trigger effects and haptics are requested from the
console, lib users have to explicitly enable them for a session by
setting the new `enable_dualsense` flag on the session's
`ChiakiConnectInfo` struct.
Trigger Effects are simply a new Takion message type `11` and
include the type of each effect and the effect data (10 bytes) for
each of the triggers. They are exposed as a new Chiaki event type
`CHIAKI_EVENT_TRIGGER_EFFECTS`.
Haptic effects are implemented in the protocol as a separate audio
stream, for which packets are only sent when there are actually
effects being played, i.e. silence is not explicitly encoded.
Audio data is 3kHz little endian 16 bit stereo sent in frames of
10 samples every 100ms. Note that the Takion AV header has the
codec field set to Opus, however this is not true.
Users can provide a new `ChiakiAudioSink` dedicated to haptics
via the new `chiaki_session_set_haptics_sink` API, which behaves
identical to the regular audio sink, except that it has a lower
frequency.