Repository navigation
test(rtc): cover native receive PCM and stream cleanup - #928
Draft
theomonnom wants to merge 1 commit into
Draft
theomonnom wants to merge 1 commit into
theomonnom wants to merge 1 commit into
Conversation
Contributor
|
👋 This PR has no changeset. If it should be released, add a markdown file under ---
"livekit-rtc": patch
---
Short description of the change, used in the release notes.
If this change doesn't need a release (docs, CI, tests), you can ignore this comment. |
This was referenced Nov 8, 2026
This branch has not been deployed
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.
TL;DR: Add exact-PCM and repeated-close regression tests for native audio receive batching.
Add integration tests for the native receive batching change through the public Python RTC API. The tests load the actual FFI selected by
LIVEKIT_LIB_PATHand pass against both stock and patched libraries; this PR changes no Python RTC production code.Twelve combinations check exact PCM order and frame metadata at 8/24/48 kHz, mono/stereo, and 7/10/20/50 ms requested frames. A repeated-close test verifies that the stream task finishes and FFI subscriptions return to baseline over 20 iterations. Sources, tracks, streams, and collection tasks are explicitly closed/disposed.
Validation: all 13 cases passed against stock and final patched FFI, including a fresh run from this branch. The 31 existing RTC lifecycle/queue tests also passed during the accompanying investigation. Changed-file Ruff lint/format checks passed.
To exercise an alternate native library:
These local-source checks do not need an SFU. They cover exact sample delivery and cleanup, not network jitter, acoustic interruption latency, or production session capacity.
Related draft PRs: receive batching, Opus AVX2, Python log filtering, inline VAD.