Skip to content

Commit

Permalink
Minor: follow same JS style
Browse files Browse the repository at this point in the history
  • Loading branch information
cwoffenden committed Oct 10, 2024
1 parent 1ecfb23 commit 24360cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio_worklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ function createWasmAudioWorkletProcessor(audioParams) {
let numInputs = inputList.length,
numOutputs = outputList.length,
numParams = 0, i, j, k, dataPtr,
quantumBytes = this.quantumSize * 4,
stackMemoryNeeded = (numInputs + numOutputs) * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}},
oldStackPtr = stackSave(),
inputsPtr, outputsPtr, outputDataPtr, paramsPtr,
didProduceAudio, paramArray;

// Calculate how much stack space is needed.
const quantumBytes = this.quantumSize * 4;
for (i of inputList) stackMemoryNeeded += i.length * quantumBytes;
for (i of outputList) stackMemoryNeeded += i.length * quantumBytes;
for (i in parameters) stackMemoryNeeded += parameters[i].byteLength + {{{ C_STRUCTS.AudioParamFrame.__size__ }}}, ++numParams;
Expand Down

0 comments on commit 24360cf

Please sign in to comment.