mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-11 13:07:32 +01:00
At wake time PipeWire often has only the auto_null sink (verified from journalctl on 2026-07-11: "ONLY auto_null PipeWire sink available — alarm will be SILENT"). The old code forced only the single HDMI monitor card on and waited for its one sink; when that never enumerated, all audio drained into auto_null = silence. Now activation forces *every* card's output profile on, unmutes and maxes every sink, and the beep loop plays on *all* sinks each cycle (paplay --device), re-enumerating so late/added outputs are covered. A switched-off external speaker can't be revived by software, so every other output is tried in parallel instead of betting on one. Prior per-card profile and per-sink volume/mute are captured and restored on dismiss. Concurrent paplay children are now reaped each cycle (was 1/cycle, would have been N/cycle of <defunct> over the 30-min loud phase). Extract the pactl sink/card management into wake_alarm/_sinks.py to keep _audio.py under the 500-line limit. 100% branch coverage retained. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018SJ6HYXhBmYs3SiGBZv1rF |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _alarm_display.py | ||
| _alarm.py | ||
| _audio.py | ||
| _challenges.py | ||
| _constants.py | ||
| _logging_setup.py | ||
| _sinks.py | ||
| _smart_plug.py | ||
| _state.py | ||