Skip to content

Add stream diagnostics to detect silent-but-"running" audio output - #8

Draft
silly82 with Copilot wants to merge 2 commits into
mainfrom
copilot/check-audio-output-on-nota142
Draft

Add stream diagnostics to detect silent-but-"running" audio output#8
silly82 with Copilot wants to merge 2 commits into
mainfrom
copilot/check-audio-output-on-nota142

Conversation

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

The streamer can appear active (running: true, metadata updating) while sending only silence to hardware receivers — giving no observable signal that audio has stopped flowing. There was no way to distinguish real audio transmission from underrun-filler silence.

Changes

internal/streamer/streamer.go

  • Added three sync/atomic.Int64 counters to Streamer: packetsSent, silencePackets, lastAudioPacketAt
  • All three are reset on Start() and updated only after a successful conn.Write() — silence vs. real audio tracked via an isSilence flag
  • Status struct extended with packets_sent, silence_packets, last_audio_packet_at; GET /api/status exposes them automatically

internal/web/static/index.html

  • Added a 🔍 Stream-Diagnose panel, refreshed every 5 s alongside status, showing:
    • Total RTP packets sent / silence packet count
    • Silence ratio (%) — colour-coded 🟢 <10 % / 🟠 10–50 % / 🔴 >50 %
    • Timestamp of last real audio packet + human-readable staleness indicator
// GET /api/status — new fields
{
  "running": true,
  "station": "SWR3",
  "packets_sent": 4250,
  "silence_packets": 12,
  "last_audio_packet_at": 1744022548
}

internal/streamer/streamer_test.go

  • Added TestCurrentStatusDiagnostics covering zero-init and counter accumulation
Original prompt

VOrschlag was soll ich machen zur KOntrolle dass die Audioasugabe auf dem nota142 Hardware nicht funktioniert obwohl es angezeigt wird DIe Stream Monitor Software auf meinem Rchner funktioniert einwandfrei

Created from VS Code.

Copilot AI changed the title [WIP] Investigate audio output issue on nota142 hardware Add stream diagnostics to detect silent-but-"running" audio output Apr 7, 2026
Copilot AI requested a review from silly82 April 7, 2026 10:55
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.

2 participants