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

PCM audio playback got interrupted on Node 20 #1492

Closed
jimchen5209 opened this issue Apr 16, 2024 · 3 comments
Closed

PCM audio playback got interrupted on Node 20 #1492

jimchen5209 opened this issue Apr 16, 2024 · 3 comments

Comments

@jimchen5209
Copy link
Contributor

Not sure what's changed in Node 20 to affect this.

After upgrading Node from 18 to 20, the voice got interrupted at about 200ms when I attempted to play a PCM file, without any error or disconnection.
It works fine when I play an OPUS file.
If I downgrade to Node 18, everything works fine again.

I've tested across Node 18 to 21, it breaks only on version >= 20.

I've created a repo to reproduce this bug at https://github.com/jimchen5209/eris-node20-bug.

@jimchen5209
Copy link
Contributor Author

After debugging and searching, the problem is at node.js' side.
The issue is nodejs/node#51930.
Fixed by applying workaround highWaterMark variable to 1 at lib/voice/streams/BaseTransformer.js or downgrading node.js to 20.9.0.

@bsian03
Copy link
Collaborator

bsian03 commented Jul 8, 2024

fwiw nodejs/node#53261 which fixes the node bug is merged, in current release 22.4.0. I don't consider this worth fixing in eris since it's only affecting LTS>v20.9 and <22.4 but it's worth noting it down since it is an LTS bug.
For now I'll keep this open since Node22 isn't in LTS just yet.

Thanks for catching this btw

@bsian03
Copy link
Collaborator

bsian03 commented Oct 29, 2024

node 22 is now LTS!

@bsian03 bsian03 closed this as completed Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants