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:
@@ -2064,3 +2064,16 @@ func (b *IcomSerial) PlayTXAudio(pcm []byte, rate, ch, bits int, stop <-chan str
|
||||
}
|
||||
return fmt.Errorf("this rig takes transmit audio through its USB sound card, not the CAT link")
|
||||
}
|
||||
|
||||
// TXAudioSender hands back the network transport's live-mic sender, when this
|
||||
// rig is reached over one.
|
||||
func (b *IcomSerial) TXAudioSender() (func([]byte) error, error) {
|
||||
port := b.port
|
||||
type sender interface {
|
||||
TXAudioSender() (func([]byte) error, error)
|
||||
}
|
||||
if p, ok := port.(sender); ok {
|
||||
return p.TXAudioSender()
|
||||
}
|
||||
return nil, fmt.Errorf("this rig takes transmit audio through its USB sound card, not the CAT link")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user