Set TfStereo when publishing stereo audio sources - #1337
Open
truemagic-coder wants to merge 4 commits into
Open
Conversation
truemagic-coder
marked this pull request as ready for review
August 17, 2026 08:33
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.
Before you submit your PR
PR description
Fixes #1018.
When a
LocalAudioTrackis created from a two-channelAudioSource, the publication path does not currently includeAudioTrackFeature::TfStereoinAddTrackRequest.audio_features.As a result, the server is not told that the source is stereo.
This PR:
TfStereofor two-channel native audio sources;TfPreconnectBufferbehavior and composes it withTfStereo;NativeAudioSourcevalues;livekitandlivekit-ffi.NativeAudioSourcecan represent more than two channels, butTfStereois a stereo flag rather than a multichannel layout. Automatic stereo advertisement is therefore limited to exactly two channels.Breaking changes
None.
MSRV
No change.
Testing
Tests cover:
TfStereo;TfStereo;TfStereo;TfStereoandTfPreconnectBuffercompose correctly;livekitpackage test suite;Verification
The exact submitted commit was independently verified with FalseGreen against a frozen verification contract.
TfStereo;TfStereo;livekitpackage test suite and workspace formatting pass;livekitandlivekit-ffi;1f76ed000a2d65749c4008a24e7715c1eeca29a7.The verification is scoped to these criteria and does not claim broader correctness of the LiveKit Rust SDK.
Async
No runtime or async behavior changes.
Assisted-by: Codex