6 Commits

Author SHA1 Message Date
Johannes Baiter
74d39e6314 lib: Add support for trigger effects and controller haptics
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.
2022-11-01 18:29:05 +01:00
Florian Märkl
b790fb3fb5 Set PATH to find protoc for nanopb generator 2022-06-02 18:26:42 +02:00
Florian Märkl
92827c7911
Update Protobuf 2020-12-28 16:43:10 +01:00
Florian Märkl
5faa801331
Port to Windows 2019-08-20 18:36:58 +02:00
Florian Märkl
e63423c83e
Add .travis.yml 2019-08-17 17:24:25 +02:00
Florian Märkl
1f6209e638
Add Protobuf 2019-08-17 14:38:16 +02:00