Repository navigation
m17-gateway: hold reflector voice while the gateway speaks - #12
Merged
Merged
Conversation
The gateway's own voice, an announcement such as the INFO reply or an echo playback, went out while reflector voice did. The two streams took the transmitter from each other frame by frame, each switch with an EOT and a new LSF, and the audio of both was mixed. Reflector voice is now held while the gateway speaks, as it already is for local RF, and joined with a fresh LSF afterwards. Holds are counted, as they can overlap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a busy reflector module, the gateway's own voice (the INFO reply, an ECHO playback) fought incoming reflector voice for the transmitter, chopping both up. Now reflector voice waits while the gateway speaks, as it already does for a local radio, and rejoins with a fresh LSF afterwards.
Change
TransmitVoiceStreamalso holds reflector voice whileownTX > 0;playMessageandechoStreamEndtake the hold withdefer g.holdVoice()().ownTXis a counter, since holds can overlap. The hold log line names its reason.TransmitVoiceStreamcallers.Testing
go test ./...andgo test -race ./cmd/m17-gateway/pass.TestOwnVoiceNotInterrupted(announcement, echo) fails on master with interleaved frames ([0 256 1 257 …]) and passes here.TestNetVoiceWaitsForSpeakingcovers overlapping holds.#INFOand unkey.