From 08bc401681232143a5f42385126f3ae83cca561e Mon Sep 17 00:00:00 2001 From: rouggy Date: Sat, 29 Aug 2026 21:45:18 +0200 Subject: [PATCH] fix(audio): the network monitor needs no From-radio device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AudioStartMonitor refused before reaching the network branch when From-radio was empty — which is the NORMAL network setup, so the new speakers checkbox un-ticked itself the instant it was ticked. The capture-device requirement now applies only to the USB path that actually captures. --- app.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app.go b/app.go index 7fd4c7a..a7aa592 100644 --- a/app.go +++ b/app.go @@ -10681,9 +10681,6 @@ func (a *App) AudioStartMonitor() error { return fmt.Errorf("audio not initialized") } cfg, _ := a.GetAudioSettings() - if strings.TrimSpace(cfg.FromRadio) == "" { - return fmt.Errorf(`no "From radio" capture device set — pick the rig's USB Audio CODEC in Settings → Audio`) - } // When the rig's audio arrives over the NETWORK (Icom 50003), the monitor // must be render-only: this button used to start a USB capture from the // "From radio" device as well, and that second producer — often another @@ -10695,6 +10692,13 @@ func (a *App) AudioStartMonitor() error { applog.Printf("audio: RX monitor start (network sink only → listen=%q)", cfg.ListeningDevice) return a.audioMgr.StartMonitorSink(cfg.ListeningDevice) } + // Only the USB path needs a capture device — checked AFTER the network + // branch, which needs none: with From-radio empty (the normal network + // setup) this refusal was un-ticking the speakers checkbox the instant it + // was ticked. + if strings.TrimSpace(cfg.FromRadio) == "" { + return fmt.Errorf(`no "From radio" capture device set — pick the rig's USB Audio CODEC in Settings → Audio`) + } applog.Printf("audio: RX monitor start (from=%q → listen=%q)", cfg.FromRadio, cfg.ListeningDevice) a.audioMgr.SetMonitorGain(cfg.FromGain) return a.audioMgr.StartMonitor(cfg.FromRadio, cfg.ListeningDevice)