From 8a29f13650553c8e4a52d2124fe97590be6ff542 Mon Sep 17 00:00:00 2001 From: Phillip Hermans Date: Tue, 7 Jul 2015 13:00:38 -0700 Subject: [PATCH] Changed hardcoded blockAlign to variable --- recorderWorker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recorderWorker.js b/recorderWorker.js index a24bb45d..60fb6201 100644 --- a/recorderWorker.js +++ b/recorderWorker.js @@ -131,7 +131,7 @@ function encodeWAV(samples){ /* sample rate */ view.setUint32(24, sampleRate, true); /* byte rate (sample rate * block align) */ - view.setUint32(28, sampleRate * 4, true); + view.setUint32(28, sampleRate * numChannels * 2, true); /* block align (channel count * bytes per sample) */ view.setUint16(32, numChannels * 2, true); /* bits per sample */