Androz2091 / Androz2091/discord-player

Bun lags and freeze

Open
#1,991 6 comments 1 reaction 0 assignees View on GitHub
bug discussion need repro
Dominant language
TypeScript
Stars
638
Forks
197
Avg merge
2m
Merged PRs (30d)
1

Description

**Describe the bug**
When using the library, more precisely when the library uses the deprecated discord-voip dependency using bun and not node, an error message appears and my audio stream cuts out and then resumes, catching up with the delay

**To Reproduce**
Steps to reproduce the behavior:
1. Use the lib with bun ?
2. Wait 2-3s and then the bug appear

**Expected behavior**
The sound cuts then restart with accelerating until it had reach the missing time.
```
TimeoutNegativeWarning: -29 is a negative number.
Timeout duration was set to 1.
at prepareNextAudioFrame (/home/wiibleyde/Documents/Perso/Eve/node_modules/discord-voip/dist/index.js:128:28)
```

**Please complete the following information:**
- Node Version: 22.14.0
- Bun Version: 1.2.7 (https://bun.sh/)
- Discord Player Version: 7.1.0
- Discord.js Version: 14.16.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.