mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
Added Opus stream support, added volume interface (#1102)
* Added opus stream support, added volume interface * Remove setImmediate * Fix weird syntax error * Most useless commit ever You're welcome, @PgBiel * Fix potential memory leak with OpusScript Emscripten has the tendency to not free resources even when the Opus engine instance has been garbage collected. Thanks to @abalabahaha for pointing this out. * Typo * VoiceReceiver.destroy: destroy opus encoder
This commit is contained in:
@@ -84,7 +84,8 @@ class VoiceReceiver extends EventEmitter {
|
||||
stream._push(null);
|
||||
this.opusStreams.delete(id);
|
||||
}
|
||||
for (const [id] of this.opusEncoders) {
|
||||
for (const [id, encoder] of this.opusEncoders) {
|
||||
encoder.destroy();
|
||||
this.opusEncoders.delete(id);
|
||||
}
|
||||
this.destroyed = true;
|
||||
|
||||
Reference in New Issue
Block a user