Skip to content

Conversation

@ladvoc
Copy link
Contributor

@ladvoc ladvoc commented Oct 3, 2025

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.

Note: This issue only occurs when resampling is required (i.e., when the sample rate or number of channels used to create the NativeAudioStream does not match the source).

ladvoc added 2 commits October 3, 2025 18:37
`RemixAndResample` will not initialize this field, causing the slice's length to be computed to zero.
@ladvoc ladvoc changed the title Fix audio resampler returns empty frames Fix empty audio frames after resample Oct 3, 2025
@ladvoc ladvoc marked this pull request as ready for review October 3, 2025 09:26
@s-hamdananwar s-hamdananwar merged commit b776e64 into main Oct 3, 2025
9 checks passed
@s-hamdananwar s-hamdananwar deleted the ladvoc/resample-fix branch October 3, 2025 15:35
@github-actions github-actions bot mentioned this pull request Oct 3, 2025
@ladvoc ladvoc mentioned this pull request Oct 4, 2025
Be-ing added a commit to Be-ing/rust-sdks that referenced this pull request Nov 4, 2025
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 added a commit to Be-ing/rust-sdks that referenced this pull request Nov 4, 2025
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 added a commit to Be-ing/rust-sdks that referenced this pull request Nov 12, 2025
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 added a commit to Be-ing/rust-sdks that referenced this pull request Nov 20, 2025
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 added a commit to Be-ing/rust-sdks that referenced this pull request Dec 1, 2025
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.
xianshijing-lk pushed a commit that referenced this pull request Dec 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.
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.

4 participants