fix(voice): handle negative timeouts (#11362)

This commit is contained in:
Marko Kajzer
2025-12-18 03:53:10 +09:00
committed by GitHub
parent c4fc79a3cd
commit 5f93fbd0f2

View File

@@ -136,7 +136,7 @@ function prepareNextAudioFrame(players: AudioPlayer[]) {
if (!nextPlayer) { if (!nextPlayer) {
if (nextTime !== -1) { if (nextTime !== -1) {
audioCycleInterval = setTimeout(() => audioCycleStep(), nextTime - Date.now()); audioCycleInterval = setTimeout(() => audioCycleStep(), Math.max(1, nextTime - Date.now()));
} }
return; return;