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(mp3-encoder): Suppress assertion #1481

Merged
merged 1 commit into from
Nov 21, 2024
Merged

fix(mp3-encoder): Suppress assertion #1481

merged 1 commit into from
Nov 21, 2024

Conversation

tassoevan
Copy link
Collaborator

@tassoevan tassoevan commented Nov 8, 2024

Proposed changes (including videos or screenshots)

It suppresses assertions at the LAME encoding due to unknown NaN values.

Issue(s)

Further comments

This is the original assert function: https://github.com/zhuker/lamejs/blob/090eaa9b7e90abb81939145f13be2bdcd06ac5e6/src/js/common.js#L148-L150

During investigation, the input buffers showed a small segment of NaN values instead of the expected typed Float32 numbers. It couldn't be determined where they are allocated, because they seen to exist prior to the flush call. Since there is no async function or callbacks at play (as the original code was transpiled from single-threaded Java code), the hypothesis of message events out of sync at the worker thread can be disregarded. One interesting thing to note is that when using a external microphone instead of Macbook's built-in microphone did not generated the NaN values; it might indicate a bug with the channel enumeration.

@tassoevan tassoevan requested a review from a team November 8, 2024 18:11
Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: 3764a57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/mp3-encoder Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tassoevan tassoevan force-pushed the fix/mp3 branch 2 times, most recently from 9b4f530 to 0287ab2 Compare November 11, 2024 23:11
@tassoevan tassoevan merged commit 8084488 into main Nov 21, 2024
6 checks passed
@tassoevan tassoevan deleted the fix/mp3 branch November 21, 2024 13:36
@github-actions github-actions bot mentioned this pull request Nov 14, 2024
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