Skip to content

Commit 38f614a

Browse files
authored
p5.Delay patch dispose method, p5.Filter module export (#187)
1 parent 9788312 commit 38f614a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/delay.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ define(function (require) {
5555
* </code></div>
5656
*/
5757
p5.Delay = function() {
58-
p5.Effect.call(this);
58+
Effect.call(this);
5959

6060
this._split = this.ac.createChannelSplitter(2);
6161
this._merge = this.ac.createChannelMerger(2);
@@ -82,8 +82,8 @@ define(function (require) {
8282
*/
8383
this.rightDelay = this.ac.createDelay();
8484

85-
this._leftFilter = new p5.Filter();
86-
this._rightFilter = new p5.Filter();
85+
this._leftFilter = new Filter();
86+
this._rightFilter = new Filter();
8787
this._leftFilter.disconnect();
8888
this._rightFilter.disconnect();
8989

@@ -266,8 +266,8 @@ define(function (require) {
266266
Effect.prototype.dispose.apply(this);
267267

268268
this._split.disconnect();
269-
this._leftFilter.disconnect();
270-
this._rightFilter.disconnect();
269+
this._leftFilter.dispose();
270+
this._rightFilter.dispose();
271271
this._merge.disconnect();
272272
this._leftGain.disconnect();
273273
this._rightGain.disconnect();

src/filter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,6 @@ define(function (require) {
250250
p5.Filter.call(this, 'bandpass');
251251
};
252252
p5.BandPass.prototype = Object.create(p5.Filter.prototype);
253+
254+
return p5.Filter;
253255
});

0 commit comments

Comments
 (0)