notifications: play a sound when a notification arrives - #1906
Open
Coral-coder wants to merge 4 commits into
Open
notifications: play a sound when a notification arrives#1906Coral-coder wants to merge 4 commits into
Coral-coder wants to merge 4 commits into
Conversation
Four short chirps (Ping, Doorbell, Trill, Ascent) rendered through the speaker service's note sequences, a persisted preference defaulting to off, and an alerts-service gate mirroring the vibe rules. DND follows the vibe mask, and the vibe holdoff is reused so a notification storm does not chirp continuously; unlike vibes, sounds still play on the charger where a vibe would go unnoticed. Speaker mute and volume are enforced downstream by the speaker service. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Coral Coder <noreply@anthropic.com>
Plays the selected chirp when a notification arrives, following the same delay-until-peek-settles choice as the vibe so sound and haptics land together. Both alert gates are evaluated before firing either: the vibe stamps the shared holdoff timestamp when it runs, which would otherwise suppress the same notification's sound. The sound path stamps the holdoff too, so sound-only setups still get storm throttling. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Coral Coder <noreply@anthropic.com>
Select cycles through the sounds and previews the new choice at the volume notifications will use. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Coral Coder <noreply@anthropic.com>
bt_rf_fulcal.c trips GCC 13's flow analysis (p0/capcode0/idac0 in the RF-cal routines) and the warning is promoted to an error, breaking builds outside the project docker image. Silence it for this vendored SDK only. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Coral Coder <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because someone on Reddit wanted it, and I kinda did too… 🤷🏼♀️
Adds an optional notification sound for speaker-equipped watches, rendered through the existing note-sequence synth — no PCM assets, a few hundred bytes of note tables. Off by default; picker lives in Settings → Sounds & Haptics and previews each choice on select.
The four tones (Ping, Doorbell, Trill, Ascent) are deliberately quite basic — single-voice chirps meant to prove out the plumbing rather than be the final sound design. Happy to take direction on better melodies; each is ~5 lines of note table.
Behavior: DND follows the vibe mask, the vibe holdoff is shared so a notification storm doesn’t chirp continuously (both gates evaluated before either fires, so a notification’s own vibe can’t suppress its own sound), and speaker mute/volume are enforced by the speaker service. Unlike vibes, sounds still play on the charger, where a docked watch can usefully chirp.
The last commit (third_party/hal_sifli: -Wno-maybe-uninitialized) only matters for building with stock GCC 13 outside the docker image — drop it if unwanted.
Tested on Pebble Time 2 (obelix@pvt); full test suite passes.