feat(icom): listening to the network audio is a remembered choice

The RX stream and the speakers were welded together: every reconnect and
every launch restarted the monitor, so an operator sitting in the room with
the radio could not have the stream (which the recorder and the voice keyer
need) without also hearing it twice. Stop listening now persists, the Listen
button turns it back on, and reconnects respect the choice.
This commit is contained in:
2026-08-29 19:42:18 +02:00
parent 13434ca36c
commit c878742e50
2 changed files with 15 additions and 3 deletions
+11 -1
View File
@@ -159,6 +159,7 @@ const (
keyCATIcomNetUser = "cat.icom.net.user" // Icom network: Network User1 ID
keyCATIcomNetPass = "cat.icom.net.pass" // Icom network: Network User1 password
keyCATIcomNetAudio = "cat.icom.net.audio" // Icom network: stream RX audio on 50003 (experimental)
keyAudioMonitorOn = "audio.monitor.on" // play the network RX audio through the Listening device (the stream itself stays open for the recorder either way)
keyCATTCIHost = "cat.tci.host" // TCI host (Expert Electronics SunSDR / ExpertSDR2)
keyCATTCIPort = "cat.tci.port" // TCI WebSocket port (default 40001)
keyCATTCISpots = "cat.tci.spots" // push cluster spots to the TCI panorama
@@ -10690,6 +10691,7 @@ func (a *App) AudioStartMonitor() error {
// The result was audio chopped to pieces the moment the operator toggled
// Listening off and on while connected to a network Icom.
if cs, err := a.GetCATSettings(); err == nil && cs.Enabled && cs.Backend == "icom-net" && cs.IcomNetAudio {
a.setSetting(keyAudioMonitorOn, "1")
applog.Printf("audio: RX monitor start (network sink only → listen=%q)", cfg.ListeningDevice)
return a.audioMgr.StartMonitorSink(cfg.ListeningDevice)
}
@@ -10700,6 +10702,7 @@ func (a *App) AudioStartMonitor() error {
// AudioStopMonitor stops the RX monitor passthrough.
func (a *App) AudioStopMonitor() {
a.setSetting(keyAudioMonitorOn, "0")
if a.audioMgr != nil {
a.audioMgr.StopMonitor()
applog.Printf("audio: RX monitor stopped")
@@ -15590,7 +15593,14 @@ func (a *App) reloadCAT() {
// verification (see icomaudio.go) — hence experimental + opt-in.
acfg, _ := a.GetAudioSettings()
a.audioMgr.StopMonitor() // clear any prior monitor/sink so a re-save restarts cleanly
if err := a.audioMgr.StartMonitorSink(acfg.ListeningDevice); err != nil {
// Listening is a CHOICE, remembered: an operator sitting next to the
// radio hears it in the room and wants the stream only for the
// recorder and the voice keyer. Stop listening turns this off, the
// Listen button turns it back on, and reconnects respect it instead
// of switching the speakers back on every time.
if a.settingOr(keyAudioMonitorOn, "1") != "1" {
applog.Printf("icom-net audio: stream on, speakers off (Listening was stopped by the operator)")
} else if err := a.audioMgr.StartMonitorSink(acfg.ListeningDevice); err != nil {
applog.Printf("icom-net audio: cannot start output sink: %v", err)
} else {
codec := audio.NewPCM16Codec()
+4 -2
View File
@@ -21,7 +21,8 @@
"Icom network audio: it now starts with the app — launching OpsLog connected with audio silently off, and the option had to be unticked and re-saved to hear anything.",
"Icom network: when the rig goes quiet on CI-V while the session stays up (seen on the IC-7760), the CI-V flow is re-opened on the spot — recovery in seconds instead of the 35-second full reconnect.",
"Icom network: after a session dies young, the redial waits 20 s so the rig can purge the old session first — stops the reconnect-die-reconnect spiral seen on the IC-7760, where each fresh session answered for a second and was then strangled by the previous ones cleanup.",
"Icom network audio, phase 5: the radio can now TAKE audio — with RX audio enabled, pick “Radio (network audio)” as the To-radio device and the voice keyer plays straight to the rig over the LAN, no cable, no virtual sound card. First tested on the IC-7760."
"Icom network audio, phase 5: the radio can now TAKE audio — with RX audio enabled, pick “Radio (network audio)” as the To-radio device and the voice keyer plays straight to the rig over the LAN, no cable, no virtual sound card. First tested on the IC-7760.",
"Icom network audio: listening is now a remembered choice — Stop listening keeps the speakers off across reconnects and restarts, while the stream stays open for the QSO recorder and the voice keyer."
],
"fr": [
"Console Elecraft : le S-mètre est calibré sur un vrai K3 — S9 et les +dB correspondent désormais à laffichage de la radio (il lisait environ deux points S trop bas).",
@@ -42,7 +43,8 @@
"Audio réseau Icom : il démarre maintenant avec lapplication — au lancement, la connexion se faisait audio coupé, et il fallait décocher/recocher loption pour entendre quelque chose.",
"Réseau Icom : quand la radio se tait sur le CI-V alors que la session tient (constaté sur lIC-7760), le flux CI-V est rouvert immédiatement — récupération en quelques secondes au lieu des 35 secondes de reconnexion complète.",
"Réseau Icom : après une session morte jeune, la renumérotation attend 20 s pour que la radio purge dabord lancienne session — stoppe la spirale reconnexion-mort-reconnexion vue sur lIC-7760, où chaque session neuve répondait une seconde avant d’être étranglée par le nettoyage de la précédente.",
"Audio réseau Icom, phase 5 : la radio peut maintenant RECEVOIR de laudio — avec le RX audio activé, choisissez « Radio (network audio) » comme périphérique To Radio et le voice keyer joue directement vers la radio par le LAN, sans câble ni carte son virtuelle. Premier test sur lIC-7760."
"Audio réseau Icom, phase 5 : la radio peut maintenant RECEVOIR de laudio — avec le RX audio activé, choisissez « Radio (network audio) » comme périphérique To Radio et le voice keyer joue directement vers la radio par le LAN, sans câble ni carte son virtuelle. Premier test sur lIC-7760.",
"Audio réseau Icom : l’écoute est désormais un choix mémorisé — Stop listening garde les enceintes coupées à travers reconnexions et redémarrages, tandis que le flux reste ouvert pour lenregistreur de QSO et le voice keyer."
]
},
{