feat(icom): live microphone over the network — the last remote brick
The talk button learns the network road the voice keyer already took: when To-radio is the radio itself, the microphone is captured and re-framed into the rig's 320-sample packets, the capture callback serving as the clock — the mic delivers in real time, so no ring and no pacer. Counters and the frame remainder live on the audio stream, so a talk session spans calls. PTT keys before and releases after, through the same code as the USB path. With this, a network Icom is a complete remote station over three UDP ports: RX audio to the headset, live voice and recorded messages back, CW through the rig's keyer, CAT for everything else.
This commit is contained in:
@@ -972,6 +972,15 @@ func (n *icomNet) PlayTXAudio(pcm []byte, rate, ch, bits int, stop <-chan struct
|
||||
return n.audio.PlayTX(pcm, rate, ch, bits, stop)
|
||||
}
|
||||
|
||||
// TXAudioSender returns a function that streams live microphone chunks to the
|
||||
// rig — the talk button's road, where PlayTXAudio is the voice keyer's.
|
||||
func (n *icomNet) TXAudioSender() (func([]byte) error, error) {
|
||||
if n.audio == nil {
|
||||
return nil, fmt.Errorf("the radio's audio stream is not open — enable RX audio in Settings → CAT first")
|
||||
}
|
||||
return n.audio.SendTXChunk, nil
|
||||
}
|
||||
|
||||
func icnOpenClose(seq uint16, sentid, rcvdid uint32, civSeq uint16, magic byte) []byte {
|
||||
b := make([]byte, 0x16)
|
||||
icnLE.PutUint32(b[0:], 0x16)
|
||||
|
||||
Reference in New Issue
Block a user