MCPcopy
hub / github.com/mattdiamond/Recorderjs / interleave

Function interleave

lib/recorder.js:142–155  ·  view source on GitHub ↗
(inputL, inputR)

Source from the content-addressed store, hash-verified

140 }
141
142 function interleave(inputL, inputR) {
143 var length = inputL.length + inputR.length;
144 var result = new Float32Array(length);
145
146 var index = 0,
147 inputIndex = 0;
148
149 while (index < length) {
150 result[index++] = inputL[inputIndex];
151 result[index++] = inputR[inputIndex];
152 inputIndex++;
153 }
154 return result;
155 }
156
157 function floatTo16BitPCM(output, offset, input) {
158 for (var i = 0; i < input.length; i++, offset += 2) {

Callers 2

exportWAVFunction · 0.85
exportWAVMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected