Skip to content

feat(atemschutz): spoken Druckabfrage + Rückzugsalarm cues - #149

Merged
DeepDiver1975 merged 4 commits into
mainfrom
feat/scba-druckabfrage-audio-cue
Aug 30, 2026
Merged

feat(atemschutz): spoken Druckabfrage + Rückzugsalarm cues#149
DeepDiver1975 merged 4 commits into
mainfrom
feat/scba-druckabfrage-audio-cue

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #81. Aligns this branch with the issue (which superseded the original, narrower scope of this PR):

  • AlarmSound.ScbaControlDue → renamed to AlarmSound.PressureCheckDue, now with its own spoken clip voice-druckabfrage.wav instead of the reused generic alarm.wav tone. Still plays once per due-crossing per Trupp, silenced by a recorded pressure reading until the next Abfrage-Intervall.
  • Rückzugsalarm siren → speech: the looping alarm.wav siren is gone. A spoken "Rückzugsalarm" cue (voice-rueckzugsalarm.wav) now repeats every 15s while unacknowledged, mirroring ReminderViewModel's existing repeat-until-acknowledged cadence for the ILS reminder (same pattern, 15s instead of 60s given the life-safety stakes).
  • IAlarmService.Start()/Stop() removed entirely — confirmed via a full-repo grep that ScbaViewModel was their only caller (4 call sites), so nothing else needed touching once the siren was gone.
  • Both voice clips were AI-generated and supplied as MP3; converted to mono 16-bit PCM WAV @ 22050Hz via ffmpeg to match every other bundled voice asset and SystemAlarmService's WAV-only playback paths (winmm on Windows and aplay on Linux don't decode MP3).

Test plan

  • dotnet test tests/LageBuch.AppLogic.Tests — full suite green (299 tests), including a rework of every Rückzugsalarm test off IsSounding/Start/Stop onto asserting FakeAlarmService.Played, plus new tests for the 15s repeat cadence and the immediate-reannounce-after-ack behavior for a newly-alarming Trupp.
  • Manually verified both converted WAV files play correctly via aplay (the same code path SystemAlarmService uses on Linux) — correct format, no errors.
  • Full 8-project solution test suite green (~807 tests).
  • Not yet verified on Windows/macOS playback paths, or on a real device — this repo's CI doesn't exercise actual audio playback, only FakeAlarmService.Played assertions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UwN31QccH98YV9eEc2bue2

Base automatically changed from feat/atemschutz-truppnummer-lifecycle to main August 29, 2026 21:28
@DeepDiver1975
DeepDiver1975 force-pushed the feat/scba-druckabfrage-audio-cue branch from 032034a to 2bfea6a Compare August 29, 2026 21:31
@DeepDiver1975 DeepDiver1975 changed the title feat(atemschutz): play an audio cue when a Trupp's Druckabfrage comes due feat(atemschutz): spoken Druckabfrage + Rückzugsalarm cues Aug 29, 2026
@DeepDiver1975
DeepDiver1975 marked this pull request as ready for review August 29, 2026 22:25
@DeepDiver1975
DeepDiver1975 force-pushed the feat/scba-druckabfrage-audio-cue branch from a127e4d to d6cfd27 Compare August 30, 2026 20:31
DeepDiver1975 and others added 4 commits August 30, 2026 22:55
… due

The pressure-control reminder was visual-only (an amber banner) --
easy to miss when the operator isn't looking at the screen, which is
exactly when it matters most. Adds AlarmSound.ScbaControlDue, reusing
the existing alarm.wav tone (same choice/rationale already recorded
for AlarmSound.TaskDue: a spoken sentence would be more noise than
signal for an event recurring every few minutes per Trupp).

Plays once per due-crossing per Trupp, silencing again the instant a
pressure reading is recorded until the next Abfrage-Intervall elapses
-- mirroring TasksViewModel's one-shot due-sound pattern, including
its choice to gate only on IsReadOnly (not IsRemote): sound is local
feedback for whoever is looking at a device, not a journal write that
must only happen once.

Marked as a draft PR: not yet ready.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UwN31QccH98YV9eEc2bue2
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…ckabfrage cue (#81)

Aligns this branch with issue #81: renames AlarmSound.ScbaControlDue
to PressureCheckDue and gives it its own spoken clip
(voice-druckabfrage.wav) instead of reusing the generic alarm.wav
tone, and replaces the looping Rückzugsalarm siren with a spoken
"Rückzugsalarm" cue (voice-rueckzugsalarm.wav) repeated every 15s
while unacknowledged -- mirroring ReminderViewModel's existing
repeat-until-acknowledged cadence for the ILS reminder, just at 15s
given the life-safety stakes instead of 60s.

IAlarmService.Start()/Stop() are removed entirely now that nothing
loops a siren anymore -- they were only ever called from ScbaViewModel
(4 call sites), confirmed by grep across the whole app.

Both voice clips were AI-generated and supplied as MP3; converted to
mono 16-bit PCM WAV @ 22050Hz via ffmpeg to match every other bundled
voice asset and SystemAlarmService's existing WAV-only playback paths
(Windows winmm PlaySound and Linux aplay don't decode MP3).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UwN31QccH98YV9eEc2bue2
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
SystemAlarmService.Play() was fire-and-forget on all platforms, so two
cues becoming due in the same tick (e.g. a Trupp's RetreatAlarm and
another Trupp's PressureCheckDue) played concurrently and talked over
each other. Playback now goes through a SerialAudioQueue that runs
cues one at a time on a dedicated background thread, with a watchdog
timeout so a hung OS player can't permanently block later alarms.

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Start()/Stop() referenced _sounding, _wav, SndAsync and SndLoop, none
of which exist anymore — the branch rebase onto main kept these method
bodies from main's old looping-siren SystemAlarmService while also
keeping this branch's removal of their backing fields (main's siren
was already fully replaced by spoken Play() cues here). Neither method
is called anywhere (IAlarmService doesn't declare them), so this was
dead code left by an incomplete conflict resolution, breaking the
build (CS0103) on both CI platforms.

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 force-pushed the feat/scba-druckabfrage-audio-cue branch from d1a6ed5 to 1d3ce59 Compare August 30, 2026 20:55
@DeepDiver1975
DeepDiver1975 merged commit 0bdcbfd into main Aug 30, 2026
2 checks passed
@DeepDiver1975
DeepDiver1975 deleted the feat/scba-druckabfrage-audio-cue branch August 30, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spoken audio cues for Atemschutz (Druckabfrage fällig + replace Rückzugsalarm siren with speech)

1 participant