pitch effect is applied to active sound players array

This commit is contained in:
Eric Rosenbaum 2017-01-30 11:18:28 -05:00
parent c9029396c6
commit 263f614ef8

View file

@ -181,7 +181,10 @@ AudioPlayer.prototype.stopAllSounds = function () {
// stop drum notes // stop drum notes
this.audioEngine.drumPlayer.stopAll(); this.audioEngine.drumPlayer.stopAll();
};
AudioPlayer.prototype.setPitchEffect = function (value) {
this.pitchEffect.set(value, this.activeSoundPlayers);
}; };
AudioPlayer.prototype.setEffect = function (effect, value) { AudioPlayer.prototype.setEffect = function (effect, value) {
@ -233,7 +236,7 @@ AudioPlayer.prototype.changeEffect = function (effect, value) {
AudioPlayer.prototype.clearEffects = function () { AudioPlayer.prototype.clearEffects = function () {
this.panEffect.set(0); this.panEffect.set(0);
this.pitchEffect.set(0, this.soundPlayers); this.pitchEffect.set(0, this.activeSoundPlayers);
this.effectsNode.gain.value = 1; this.effectsNode.gain.value = 1;
this.audioEngine.echoEffect.set(0); this.audioEngine.echoEffect.set(0);