feat: network audio into the QSO recorder, and a Yaesu that stays on its VFO
An Icom reached over the LAN streams its receive audio through the Icom
protocol, and Windows sees no sound card for it at all — the audio settings
could only offer the PC's own microphone, so "From radio" had nothing right to
point at and the QSO recorder had nothing to record. The recorder now accepts a
PUSHED source: the decoded stream goes to the speakers and to the recorder
alike, with no virtual cable to set up. Which source it uses follows the CAT
backend, and it is restarted only when that answer changes, so an ordinary
settings save never cuts a recording in half.
OmniRig no longer sends SetSimplexMode to a Yaesu when tuning. It is a silent
no-op on some — an FT-891 logged OK on every spot click while FreqA never
moved — and actively harmful on others. From an FT-2000 log, one QSY:
Vfo="AB"(0x80) Split=0x10000 (off) the operator's state
Vfo="BA"(0x100) Split=0x8000 (ON) after SetSimplexMode
The rig-agnostic "receive and transmit HERE, simplex" call turned split on and
moved reception to VFO B. OpsLog then displayed B — reading the radio correctly,
after having moved it itself. Icom is untouched: there the call is the
authoritative one and the direct write is unreliable.
Also:
- the NEW county badge shows in the entry form itself, inside the field,
where the operator is deciding whether to call.
- the basemap buttons clear the zoom controls; Light sat a few pixels from
the minus button and was being clicked by mistake.
- French cluster status: DÉJÀ CTC reads DÉJÀ QSO.
This commit is contained in:
@@ -709,13 +709,18 @@ type App struct {
|
||||
// Halt Tx is routed by id, and the panel's Halt button must work even when
|
||||
// nothing is transmitting at that instant — so the id is remembered from
|
||||
// every Status rather than read off a live transmission.
|
||||
lastTxID atomic.Value // string
|
||||
extsvc *extsvc.Manager
|
||||
winkeyer *winkeyer.Manager
|
||||
clublog *clublog.Manager
|
||||
clublogMW *clublog.MostWanted // ClubLog "Most Wanted" DXCC ranking (opt-in)
|
||||
motorAnt motorAntenna // motorized antenna (Ultrabeam or SteppIR); nil when disabled
|
||||
ubFollowStop chan struct{} // stops the "follow frequency" loop; nil when off
|
||||
lastTxID atomic.Value // string
|
||||
extsvc *extsvc.Manager
|
||||
winkeyer *winkeyer.Manager
|
||||
clublog *clublog.Manager
|
||||
clublogMW *clublog.MostWanted // ClubLog "Most Wanted" DXCC ranking (opt-in)
|
||||
motorAnt motorAntenna // motorized antenna (Ultrabeam or SteppIR); nil when disabled
|
||||
ubFollowStop chan struct{} // stops the "follow frequency" loop; nil when off
|
||||
// qsoRecPushed records which SOURCE the recorder was started on: the network
|
||||
// stream, or a sound device. Switching CAT backends changes the answer, and a
|
||||
// recorder left capturing a device that no longer carries the radio records
|
||||
// silence without saying so.
|
||||
qsoRecPushed bool
|
||||
motorStartMu sync.Mutex // serialises startUltrabeam: two restarts at once left two poll loops on one COM port
|
||||
motorInhibStop chan struct{} // stops the "inhibit TX while moving" loop; nil when off
|
||||
motorMoveCmdNs atomic.Int64 // unixnano of the last commanded antenna move (grace window)
|
||||
@@ -8321,7 +8326,19 @@ func (a *App) startQSORecorderIfEnabled() {
|
||||
if !cfg.QSORecord {
|
||||
return
|
||||
}
|
||||
if err := a.qsoRec.Start(cfg.FromRadio, cfg.RecordingDevice, cfg.PrerollSeconds); err != nil {
|
||||
// Over the network there IS no radio sound device.
|
||||
//
|
||||
// An IC-705 or IC-7610 reached by LAN streams its receive audio through the
|
||||
// Icom protocol, and Windows sees nothing: the operator's audio settings can
|
||||
// only offer the PC's own microphone and speakers, so "From radio" has
|
||||
// nothing right to point at. The stream is pushed into the recorder instead
|
||||
// — same samples, no sound card in the middle, and no virtual cable to set up.
|
||||
from := cfg.FromRadio
|
||||
a.qsoRecPushed = a.icomNetAudioActive()
|
||||
if a.qsoRecPushed {
|
||||
from = audio.PushedSource
|
||||
}
|
||||
if err := a.qsoRec.Start(from, cfg.RecordingDevice, cfg.PrerollSeconds); err != nil {
|
||||
applog.Printf("qso-rec: start failed: %v", err)
|
||||
return
|
||||
}
|
||||
@@ -8336,6 +8353,17 @@ func (a *App) startQSORecorderIfEnabled() {
|
||||
applog.Printf("qso-rec: running (preroll %ds, mix=%v, gains rx=%.2f mic=%.2f)", cfg.PrerollSeconds, cfg.RecordingDevice != "" && cfg.RecordingDevice != cfg.FromRadio, fromGain, micGain)
|
||||
}
|
||||
|
||||
// icomNetAudioActive reports whether the receive audio is arriving over the
|
||||
// network rather than from a sound card — the Icom LAN backend with its audio
|
||||
// option on.
|
||||
func (a *App) icomNetAudioActive() bool {
|
||||
s, err := a.GetCATSettings()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return s.Enabled && s.Backend == "icom-net" && s.IcomNetAudio
|
||||
}
|
||||
|
||||
// qsoRecDir returns the configured recordings folder, defaulting to
|
||||
// <dataDir>/Recordings, and ensures it exists.
|
||||
func (a *App) qsoRecDir() string {
|
||||
@@ -14892,6 +14920,13 @@ func (a *App) reloadCAT() {
|
||||
a.catFlexDecodeSpots = s.Enabled && s.Backend == "flex" && s.FlexDecodeSpots
|
||||
a.catFlexDecodeSecs = s.FlexDecodeSecs
|
||||
a.catFlexDVKDax = s.Enabled && s.Backend == "flex" && s.FlexDVKDax
|
||||
// The recorder's source depends on the backend: over the Icom LAN there is no
|
||||
// sound card to capture, the audio is pushed in. Restarted only when the
|
||||
// answer CHANGES, so an ordinary settings save never interrupts a recording.
|
||||
if want := s.Enabled && s.Backend == "icom-net" && s.IcomNetAudio; want != a.qsoRecPushed {
|
||||
applog.Printf("qso-rec: audio source changes (network=%v) — restarting the recorder", want)
|
||||
go a.startQSORecorderIfEnabled()
|
||||
}
|
||||
a.reloadCATShare(s)
|
||||
// Nothing about the link changed → leave it connected. See catLinkSig.
|
||||
if sig := catLinkSig(s); sig == a.catSig {
|
||||
@@ -15000,8 +15035,16 @@ func (a *App) reloadCAT() {
|
||||
} else {
|
||||
codec := audio.NewPCM16Codec()
|
||||
audioSink = func(payload []byte) {
|
||||
if pcm, err := codec.Decode(payload); err == nil {
|
||||
a.audioMgr.PushMonitorAudio(pcm)
|
||||
pcm, err := codec.Decode(payload)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
a.audioMgr.PushMonitorAudio(pcm)
|
||||
// And to the QSO recorder, which has no device to capture from
|
||||
// on this backend. It drops the samples unless a recording is
|
||||
// actually running, so this costs a function call when idle.
|
||||
if a.qsoRec != nil {
|
||||
a.qsoRec.PushRX(pcm)
|
||||
}
|
||||
}
|
||||
applog.Printf("icom-net audio: RX audio streaming ENABLED (experimental) → %q", acfg.ListeningDevice)
|
||||
|
||||
Reference in New Issue
Block a user