diff --git a/app.go b/app.go index 72e0f60..ed7350f 100644 --- a/app.go +++ b/app.go @@ -15573,6 +15573,20 @@ func (a *App) reloadCAT() { if err != nil { return } + // The IC-7760 streams TWO-channel LPCM whatever the conninfo + // asks for (rxcodec 0x02 was requested, 1280-byte payloads + // kept arriving — 320 stereo frames per 20 ms tick, right + // channel all zeros). Played as mono that is half-speed + // metallic garble. A stereo-sized packet is folded to its + // left channel; a 640-byte mono packet (a rig that honours + // the request) passes through untouched. + if len(pcm) == 1280 { + mono := make([]byte, len(pcm)/2) + for i := 0; i+3 < len(pcm); i += 4 { + mono[i/2], mono[i/2+1] = pcm[i], pcm[i+1] + } + pcm = mono + } 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