Skip to content

Conversation

@Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Nov 4, 2025

This change is needed for the same reason as
b776e64 (#722):

A change in the resampler API introduced in libwebrtc m137 caused the output frame's samples_per_channel_ property to remain uninitialized. As a result, the length of the output slice was always calculated as zero, resulting in NativeAudioStream yielding audio frames without any sample data.

This change is needed for the same reason as
b776e64 (livekit#722):

A change in the resampler API introduced in libwebrtc m137 caused
the output frame's samples_per_channel_ property to remain
uninitialized. As a result, the length of the output slice was
always calculated as zero, resulting in NativeAudioStream yielding
audio frames without any sample data.
@Be-ing
Copy link
Contributor Author

Be-ing commented Nov 4, 2025

I'm unclear why #722 made a change at a higher level of the stack in NativeAudioSink rather than fixing it here. Zed calls AudioResampler::remix_and_resample directly, so switching to this repository's main branch broke audio playback in Zed.

@Be-ing
Copy link
Contributor Author

Be-ing commented Nov 17, 2025

@xianshijing-lk could you take a look at this? Zed panics on livekit's main branch without this one line change.

@Be-ing
Copy link
Contributor Author

Be-ing commented Dec 4, 2025

Ping @xianshijing-lk, could you take a look at this one line fix?

Copy link
Contributor

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, that is definitely the right thing to do

@xianshijing-lk xianshijing-lk merged commit 10a0f7f into livekit:main Dec 4, 2025
6 checks passed
@Be-ing Be-ing deleted the resampler_fix branch December 4, 2025 19:16
@xianshijing-lk
Copy link
Contributor

I just landed it. Sorry for missing the email notification.

@github-actions github-actions bot mentioned this pull request Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants