From 38f614a2b784e67501d5164b562713b3b53fb055 Mon Sep 17 00:00:00 2001 From: Jason Sigal Date: Wed, 21 Jun 2017 02:03:03 +0200 Subject: [PATCH] p5.Delay patch dispose method, p5.Filter module export (#187) --- src/delay.js | 10 +++++----- src/filter.js | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/delay.js b/src/delay.js index dfa36f68..4794dbda 100644 --- a/src/delay.js +++ b/src/delay.js @@ -55,7 +55,7 @@ define(function (require) { * */ p5.Delay = function() { - p5.Effect.call(this); + Effect.call(this); this._split = this.ac.createChannelSplitter(2); this._merge = this.ac.createChannelMerger(2); @@ -82,8 +82,8 @@ define(function (require) { */ this.rightDelay = this.ac.createDelay(); - this._leftFilter = new p5.Filter(); - this._rightFilter = new p5.Filter(); + this._leftFilter = new Filter(); + this._rightFilter = new Filter(); this._leftFilter.disconnect(); this._rightFilter.disconnect(); @@ -266,8 +266,8 @@ define(function (require) { Effect.prototype.dispose.apply(this); this._split.disconnect(); - this._leftFilter.disconnect(); - this._rightFilter.disconnect(); + this._leftFilter.dispose(); + this._rightFilter.dispose(); this._merge.disconnect(); this._leftGain.disconnect(); this._rightGain.disconnect(); diff --git a/src/filter.js b/src/filter.js index c81186ee..b7d9263f 100644 --- a/src/filter.js +++ b/src/filter.js @@ -250,4 +250,6 @@ define(function (require) { p5.Filter.call(this, 'bandpass'); }; p5.BandPass.prototype = Object.create(p5.Filter.prototype); + + return p5.Filter; });