Skip to content

Fix audio stopping after idle/screensaver with USB audio devices (#1361)#1363

Closed
aethersdr-agent[bot] wants to merge 1 commit into
mainfrom
aetherclaude/issue-1361
Closed

Fix audio stopping after idle/screensaver with USB audio devices (#1361)#1363
aethersdr-agent[bot] wants to merge 1 commit into
mainfrom
aetherclaude/issue-1361

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #1361

What was changed

Fix audio stopping after idle/screensaver with USB audio devices (#1361)

Files modified

  • src/core/AudioEngine.cpp
  • src/core/AudioEngine.h
 src/core/AudioEngine.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/core/AudioEngine.h   | 12 ++++++++++
 2 files changed, 70 insertions(+)

Generated by AetherClaude (automated agent for AetherSDR)

Add three recovery mechanisms for when Windows WASAPI audio sessions go
stale after idle/screensaver, which Qt's QAudioSink doesn't detect:

1. QMediaDevices::audioOutputsChanged listener — restarts the RX stream
   when USB audio devices (like Connect6) power-cycle or re-enumerate.

2. Zombie sink watchdog in the RX pacing timer — detects when bytesFree()
   is stuck at 0 for ~2 seconds while data is waiting, indicating a stale
   WASAPI handle, and forces a restart.

3. IdleState handling in stateChanged — catches the case where the sink
   transitions to Idle (not Stopped) with pending data, which the
   existing #1303 recovery missed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ten9876

ten9876 commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

Taking via rebased branch.

@ten9876 ten9876 closed this Apr 14, 2026
@ten9876 ten9876 deleted the aetherclaude/issue-1361 branch April 18, 2026 04:51
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.

Sound through AetherSDR stops working, have to close and reopen ADR to get it to work again.

2 participants