mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
Attempted to understand volume code and retry fixes
This commit is contained in:
@@ -11,10 +11,11 @@ var Transform = require('stream').Transform;
|
||||
var Volume = (function (_Transform) {
|
||||
_inherits(Volume, _Transform);
|
||||
|
||||
function Volume() {
|
||||
function Volume(volume) {
|
||||
_classCallCheck(this, Volume);
|
||||
|
||||
_Transform.apply(this, arguments);
|
||||
_Transform.call(this);
|
||||
this.set(volume);
|
||||
}
|
||||
|
||||
Volume.prototype.get = function get() {
|
||||
@@ -22,7 +23,7 @@ var Volume = (function (_Transform) {
|
||||
};
|
||||
|
||||
Volume.prototype.set = function set(volume) {
|
||||
this.volume = volume;
|
||||
this.volume = volume === undefined ? 1 : volume;
|
||||
};
|
||||
|
||||
Volume.prototype._transform = function _transform(buffer, encoding, callback) {
|
||||
|
||||
Reference in New Issue
Block a user