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
@@ -30,7 +30,7 @@ func sim(t *testing.T, name string, noiseFloor float64, ppm float64, jitterMs fu
|
||||
for i := 0; i < 50; i++ { talkP = append(talkP, mk(i, true)); quietP = append(quietP, mk(i, false)) }
|
||||
payloadFor := func(seq int) []byte { if seq%175 < 125 { return talkP[seq%50] }; return quietP[seq%50] }
|
||||
dec, _ := opus.NewDecoder(rate, channels)
|
||||
jb := newJitterBuffer(dec)
|
||||
jb := newJitterBuffer(dec, 111)
|
||||
r := rand.New(rand.NewSource(1))
|
||||
const dur = 3 * 3600 * 1000.0
|
||||
type ev struct{ at float64; seq uint16 }
|
||||
|
||||
Reference in new issue
Block a user