mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 11:10:38 +00:00
Webpack build: 391b618b3f
This commit is contained in:
parent
552e124fbe
commit
c626933220
2 changed files with 4 additions and 5 deletions
|
|
@ -23085,11 +23085,10 @@ class VoiceBroadcast extends EventEmitter {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyVolume(buffer, volume) {
|
applyVolume(buffer, volume = this._volume) {
|
||||||
volume = volume || this._volume;
|
|
||||||
if (volume === 1) return buffer;
|
if (volume === 1) return buffer;
|
||||||
|
|
||||||
const out = new Buffer(buffer.length);
|
const out = Buffer.alloc(buffer.length);
|
||||||
for (let i = 0; i < buffer.length; i += 2) {
|
for (let i = 0; i < buffer.length; i += 2) {
|
||||||
if (i >= buffer.length - 1) break;
|
if (i >= buffer.length - 1) break;
|
||||||
const uint = Math.min(32767, Math.max(-32767, Math.floor(volume * buffer.readInt16LE(i))));
|
const uint = Math.min(32767, Math.max(-32767, Math.floor(volume * buffer.readInt16LE(i))));
|
||||||
|
|
@ -23354,7 +23353,7 @@ class VoiceBroadcast extends EventEmitter {
|
||||||
this._missed = 0;
|
this._missed = 0;
|
||||||
|
|
||||||
if (buffer.length !== bufferLength) {
|
if (buffer.length !== bufferLength) {
|
||||||
const newBuffer = new Buffer(bufferLength).fill(0);
|
const newBuffer = Buffer.alloc(bufferLength).fill(0);
|
||||||
buffer.copy(newBuffer);
|
buffer.copy(newBuffer);
|
||||||
buffer = newBuffer;
|
buffer = newBuffer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
discord.indev-prism.min.js
vendored
2
discord.indev-prism.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue