From 58a5bc46d7a09dc28aca1d3ec03b7b1226da8188 Mon Sep 17 00:00:00 2001 From: Craig Campbell Date: Sat, 2 May 2015 21:22:57 -0400 Subject: [PATCH] Use a two channel script processor even for mono recordings This is a difficult thing to explain, but basically if you have an interface containing multiple input channels and you record in stereo on only one of the channels, the script processor node will mix down the channels to mono, and the resulting signal level will be cut in half. --- recorder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recorder.js b/recorder.js index 7d3faf8a..552fe247 100644 --- a/recorder.js +++ b/recorder.js @@ -9,7 +9,7 @@ this.context = source.context; this.node = (this.context.createScriptProcessor || this.context.createJavaScriptNode).call(this.context, - bufferLen, numChannels, numChannels); + bufferLen, 2, numChannels); var worker = new Worker(config.workerPath || WORKER_PATH); worker.postMessage({ command: 'init',