From 768da58f2cbb8ace335f7738f5d1994bb0bfe199 Mon Sep 17 00:00:00 2001 From: Ed McManus Date: Sun, 30 Aug 2015 20:35:46 -0700 Subject: [PATCH] Fix Float32Array initializers in Safari and Chrome. --- dsp.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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