From 08a81af9e50a640971bd10ed7e63bd898a060e64 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 31 Jan 2017 18:35:37 -0500 Subject: [PATCH] volume state handled in vm sound blocks --- src/index.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/index.js b/src/index.js index c5501b0..ab8ceed 100644 --- a/src/index.js +++ b/src/index.js @@ -221,16 +221,7 @@ AudioPlayer.prototype.clearEffects = function () { }; AudioPlayer.prototype.setVolume = function (value) { - this.currentVolume = this._clamp(value, 0, 100); - this.effectsNode.gain.value = this.currentVolume / 100; -}; - -AudioPlayer.prototype.changeVolume = function (value) { - this.setVolume(this.currentVolume + value); -}; - -AudioPlayer.prototype._clamp = function (input, min, max) { - return Math.min(Math.max(input, min), max); + this.effectsNode.gain.value = value / 100; }; module.exports = AudioEngine;