mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 07:02:00 +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;
|
||||
}
|
||||
|
||||
applyVolume(buffer, volume) {
|
||||
volume = volume || this._volume;
|
||||
applyVolume(buffer, volume = this._volume) {
|
||||
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) {
|
||||
if (i >= buffer.length - 1) break;
|
||||
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;
|
||||
|
||||
if (buffer.length !== bufferLength) {
|
||||
const newBuffer = new Buffer(bufferLength).fill(0);
|
||||
const newBuffer = Buffer.alloc(bufferLength).fill(0);
|
||||
buffer.copy(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