From 5984989ea7fc1075c1513c7a738b668694e51417 Mon Sep 17 00:00:00 2001 From: "Brandon McGinty (deepseek)" Date: Sat, 8 Aug 2026 22:42:18 -0400 Subject: [PATCH] fix: skip TCP-tunneled audio when UDP is active to prevent double-processing When UDP audio transport is active, ignore UDPTunnel packets (type 1) on the TCP connection. Without this, audio packets arrive via both TCP and UDP, causing the per-user sequence tracker to advance by 2 per frame. The gap detection then generates spurious PLC frames for every single audio packet, producing log spam and audio artifacts. The readRoutine now checks c.udpActive before dispatching packet type 1. --- gumble/gumble/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gumble/gumble/client.go b/gumble/gumble/client.go index eeef14a..2c9b9ee 100644 --- a/gumble/gumble/client.go +++ b/gumble/gumble/client.go @@ -252,6 +252,11 @@ func (c *Client) readRoutine() { if err != nil { break } + // When UDP audio is active, ignore TCP-tunneled audio + // (packet type 1) to avoid double-processing packets. + if pType == 1 && c.udpActive { + continue + } if int(pType) < len(handlers) { handlers[pType](c, data) }