diff --git a/dsp.js b/dsp.js index 5af9202..b5970be 100644 --- a/dsp.js +++ b/dsp.js @@ -1310,7 +1310,7 @@ function IIRFilter2(type, cutoff, resonance, sampleRate) { this.resonance = resonance; this.sampleRate = sampleRate; - this.f = Float32Array(4); + this.f = new Float32Array(4); this.f[0] = 0.0; // lp this.f[1] = 0.0; // hp this.f[2] = 0.0; // bp @@ -1776,7 +1776,7 @@ DSP.mag2db = function(buffer) { var log = Math.log; var max = Math.max; - var result = Float32Array(buffer.length); + var result = new Float32Array(buffer.length); for (var i=0; i