mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
try this fix idk
This commit is contained in:
@@ -168,19 +168,11 @@ class VoiceBroadcast extends EventEmitter {
|
|||||||
|
|
||||||
buffer = this.applyVolume(buffer);
|
buffer = this.applyVolume(buffer);
|
||||||
|
|
||||||
setImmediate(() => this.process(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
process(buffer) {
|
|
||||||
let count = 0;
|
|
||||||
|
|
||||||
for (const x of this.dispatchers.entries()) {
|
for (const x of this.dispatchers.entries()) {
|
||||||
const [volume, container] = x;
|
const [volume, container] = x;
|
||||||
if (container.size === 0) continue;
|
|
||||||
const opusPacket = this.opusEncoder.encode(this.applyVolume(buffer, volume));
|
const opusPacket = this.opusEncoder.encode(this.applyVolume(buffer, volume));
|
||||||
for (const dispatcher of container.values()) {
|
for (const dispatcher of container.values()) {
|
||||||
setTimeout(() => dispatcher.process(buffer, true, opusPacket), count);
|
setImmediate(() => dispatcher.process(buffer, true, opusPacket));
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user