fix: [overlay] suppress dead-signal detection during auto-pause to avoid - #5
fix: [overlay] suppress dead-signal detection during auto-pause to avoid #5b0g wants to merge 1 commit into
Conversation
…oid oscillation
When auto-pause is active (auto_paused == true), the recording
pipeline is paused and the ring buffer is not fed fresh audio data.
This produces stale samples with variance ≈ 0, which falsely triggers
the dead-signal detector after 30 frames (0.5s), creating an
oscillation cycle:
auto-pause -> dead-signal -> resume -> auto-pause -> ...
The dead-signal alert plays a repeated tone and shows a full-screen
"NO SOUND" overlay every ~0.8s, which is disruptive during normal
silent periods.
Fix: skip the variance check in the dead-signal detector while
auto-pause is active. Also reset silence_notified so that when
auto-pause clears (user speaks), the notification flag is fresh.
TDD: 3 unit tests in x11::overlay::tests:
- auto_pause_oscillates_with_dead_signal — proves the
oscillation is eliminated
- dead_signal_still_works_without_auto_pause — regression
guard: dead-signal works normally when auto-pause is off
- dead_signal_recovers_when_audio_returns — regression guard:
dead-signal clears when real audio resumes
All 479 tests pass (full suite).
|
Heads up: a recent commit on
If that's right, this PR's runtime fix would be redundant on current @b0g — could you pull latest |
When auto-pause is active (auto_paused == true), the recording pipeline is paused and the ring buffer is not fed fresh audio data. This produces stale samples with variance ≈ 0, which falsely triggers the dead-signal detector after 30 frames (0.5s), creating an oscillation cycle:
auto-pause -> dead-signal -> resume -> auto-pause -> ...
The dead-signal alert plays a repeated tone and shows a full-screen "NO SOUND" overlay every ~0.8s, which is disruptive during normal silent periods.
Fix: skip the variance check in the dead-signal detector while auto-pause is active. Also reset silence_notified so that when auto-pause clears (user speaks), the notification flag is fresh.
TDD: 3 unit tests in x11::overlay::tests:
All 479 tests pass (full suite).