mirror of
https://github.com/smittix/intercept.git
synced 2026-07-02 14:58:58 -07:00
00c9a6fdd9
Starting ffmpeg at decoder launch caused a pipe-buffer deadlock: ffmpeg stdout filled up (~64KB on Linux) before the browser connected to the audio stream, back-pressuring the entire pipeline and freezing dsd-fme stderr output (no text data, no syncs, no calls). New architecture: a mux thread always drains dsd-fme stdout to keep the pipeline flowing. ffmpeg starts lazily per-client when /dmr/audio/stream is requested (matching the listening post pattern). The mux forwards decoded audio to the active ffmpeg with silence fill during voice gaps, and discards audio when no client is connected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>