mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
try this fix idk
This commit is contained in:
parent
90ca422485
commit
0a6d71d7e5
1 changed files with 1 additions and 9 deletions
|
|
@ -168,19 +168,11 @@ class VoiceBroadcast extends EventEmitter {
|
|||
|
||||
buffer = this.applyVolume(buffer);
|
||||
|
||||
setImmediate(() => this.process(buffer));
|
||||
}
|
||||
|
||||
process(buffer) {
|
||||
let count = 0;
|
||||
|
||||
for (const x of this.dispatchers.entries()) {
|
||||
const [volume, container] = x;
|
||||
if (container.size === 0) continue;
|
||||
const opusPacket = this.opusEncoder.encode(this.applyVolume(buffer, volume));
|
||||
for (const dispatcher of container.values()) {
|
||||
setTimeout(() => dispatcher.process(buffer, true, opusPacket), count);
|
||||
count++;
|
||||
setImmediate(() => dispatcher.process(buffer, true, opusPacket));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue