mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-11 14:27: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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_alarm_audio.py | ||
| test_alarm_challenges.py | ||
| test_alarm_display.py | ||
| test_alarm_part2.py | ||
| test_alarm_part3.py | ||
| test_alarm_part4.py | ||
| test_alarm_playback.py | ||
| test_alarm_sinks.py | ||
| test_alarm.py | ||
| test_smart_plug.py | ||
| test_state.py | ||