add @discordjs/opus + jmd.js

This commit is contained in:
2021-04-11 12:12:39 +02:00
parent c49adbb146
commit 5c2e0737c0
977 changed files with 199471 additions and 1074 deletions

View File

@@ -376,12 +376,16 @@ class PerMessageDeflate {
this._inflate[kTotalLength]
);
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
if (this._inflate._readableState.endEmitted) {
this._inflate.close();
this._inflate = null;
} else {
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._inflate.reset();
}
}
callback(null, data);
@@ -448,12 +452,11 @@ class PerMessageDeflate {
//
this._deflate[kCallback] = null;
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._deflate.close();
this._deflate = null;
} else {
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
this._deflate.reset();
}
callback(null, data);