Skip RTP padding packets instead of concealing them
Padding/probe packets use a sequence number but carry no audio. They were treated as lost, so each one played an invented 20 ms frame (a glitch) and pushed the buffer a frame deeper for drift correction to remove again. Signature in the first live test: lost ~= drift-drops (74 vs 72 per minute). They are now skipped and counted as 'padding'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
de7ed62d96
commit
f8d0e6fc36
4 files changed
+79
-11
No files matched your search
@@ -40,7 +40,12 @@ Why v2: v1 skipped ahead on an underrun and kept playing from an empty buffer, s
|
||||
first hiccup every later wobble was another glitch. It also never corrected for a slow guest
|
||||
clock. In simulation that was ~12 glitches/min with a guest clock 30 ppm slow, against ~0
|
||||
for v2. The 3 Nov 2026 cohost "jitter" was probably this, but that night was not measured.
|
||||
The simulation is kept in `test/jb_sim_test.go.txt` (rename to `_test.go` in the package dir to run).
|
||||
The simulation (and a padding regression test, `test/pad_test.go.txt`) is kept in `test/jb_sim_test.go.txt` (rename to `_test.go` in the package dir to run).
|
||||
|
||||
Padding fix (v2b, same day): browsers send RTP padding/probe packets that use a sequence
|
||||
number but carry no audio. v1/v2 treated each one as a lost packet and played an invented
|
||||
frame. That was an audible glitch, plus a frame the drift correction later had to remove
|
||||
(signature in the logs: lost ~= drift-drops). They are now skipped and counted as `padding`.
|
||||
|
||||
The guest websocket is pinged every 25 s. Without that, the proxy closed it every 90 s
|
||||
(signalling only, audio unaffected, but the guest saw "reconnecting...").
|
||||
|
||||
Reference in new issue
Block a user