mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-30 17:52:33 +01:00
Two new toggles under Home → More options (both default off, free):
"Vibrate this device when shifting" (iOS/Android) and "Play a sound when
shifting" (iOS/Android/macOS/Windows). Distinct cues for up, down and
"no next gear" — the rejected-shift cue is the main point: the rider
learns they are out of gears without looking at the screen.
The outcome is reported by the two places that actually know it rather
than derived from the ActionResult: in virtual-shifting mode a successful
shift comes back as Ignored("shifted up"), so the result type can't tell
a shift from a rejected one. ProxyDevice.handleTrainerAction reports
didChange (sim + ERG stepping); BaseActions.performAction reports a
delivered key-down on the direct-connect path.
Audio: three synthesised ~150 ms WAVs (assets/sounds/generate.py — no
CC0 electronic-shift recordings exist, and a branded groupset recording
would raise rights questions in a public repo). just_audio + audio_session
on mobile/macOS with playback+mixWithOthers and no per-cue audio-focus
request so the trainer app's audio is never ducked; winmm PlaySound via
the already-resolved win32 package on Windows (just_audio has no Windows
implementation here). Player is created lazily on first use so riders
who never enable sound never touch the audio session.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>