Skip to content

Commit a014a87

Browse files
added .changeset/avoid_getting_webrtc_into_underrun.md
1 parent b9e072b commit a014a87

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
livekit-protocol: patch
3+
webrtc-sys-build: patch
4+
livekit: patch
5+
webrtc-sys: patch
6+
livekit-ffi: patch
7+
livekit-api: patch
8+
libwebrtc: patch
9+
soxr-sys: patch
10+
yuv-sys: patch
11+
imgproc: patch
12+
---
13+
14+
# avoid getting webrtc into underrun
15+
16+
Before this change, the Rust implementation would only start sending silence frames after missing 10 consecutive audio frames. This could cause WebRTC's audio pipeline to enter an underrun state when audio stopped temporarily.
17+
18+
Once WebRTC enters underrun, resuming audio can significantly increase latency until the pipeline stabilizes again. In testing, this could add hundreds of milliseconds of additional latency when audio resumed shortly after the underrun.
19+
20+
This change ensures silence frames are sent earlier to prevent the audio pipeline from entering underrun. By maintaining a continuous stream of audio (including silence), WebRTC can avoid unnecessary buffering and latency spikes when audio resumes.
21+
22+
In testing, this reduces the additional latency observed after underrun recovery and results in more stable end-to-end audio latency.

0 commit comments

Comments
 (0)