Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hardcoded kBytesPerSample #344

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

kuba--
Copy link
Contributor

@kuba-- kuba-- commented Jun 2, 2024

Hardcoded:

kBytesPerSample = 2;
kChannels = 2;

Does not follow webrtc assert in AudioTransportImpl::NeedMorePlayData:

RTC_DCHECK_EQ(sizeof(int16_t) * nChannels, nBytesPerSample);

so the fix follows the same convention as we have in webrtc AudioDeviceBuffer::RequestPlayoutData:

  const size_t bytes_per_frame = play_channels_ * sizeof(int16_t);

Copy link
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

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

nice lgtm

@theomonnom theomonnom merged commit b4d3fe9 into livekit:main Jun 3, 2024
2 of 5 checks passed
@kuba-- kuba-- deleted the fix-bytes_per_sample branch June 3, 2024 12:07
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