From 7d7820a70248297069a19636fa8b0fba764ebb26 Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Wed, 27 Nov 2024 17:07:49 +0100 Subject: [PATCH] Reverted assignments to the original order --- src/audio_worklet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio_worklet.js b/src/audio_worklet.js index b9223ab6a9ee3..3328e12e52295 100644 --- a/src/audio_worklet.js +++ b/src/audio_worklet.js @@ -112,8 +112,8 @@ function createWasmAudioWorkletProcessor(audioParams) { // Copy input audio descriptor structs and data to Wasm inputsPtr = dataPtr; - dataPtr += numInputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}}; k = inputsPtr >> 2; + dataPtr += numInputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}}; for (i of inputList) { // Write the AudioSampleFrame struct instance HEAPU32[k + {{{ C_STRUCTS.AudioSampleFrame.numberOfChannels / 4 }}}] = i.length; @@ -129,8 +129,8 @@ function createWasmAudioWorkletProcessor(audioParams) { // Copy parameters descriptor structs and data to Wasm paramsPtr = dataPtr; - dataPtr += numParams * {{{ C_STRUCTS.AudioParamFrame.__size__ }}}; k = paramsPtr >> 2; + dataPtr += numParams * {{{ C_STRUCTS.AudioParamFrame.__size__ }}}; for (i = 0; paramArray = parameters[i++];) { // Write the AudioParamFrame struct instance HEAPU32[k + {{{ C_STRUCTS.AudioParamFrame.length / 4 }}}] = paramArray.length; @@ -144,8 +144,8 @@ function createWasmAudioWorkletProcessor(audioParams) { // Copy output audio descriptor structs to Wasm (note that dataPtr after // the struct offsets should now be 16-byte aligned). outputsPtr = dataPtr; - dataPtr += numOutputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}}; k = outputsPtr >> 2; + dataPtr += numOutputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}}; for (i of outputList) { // Write the AudioSampleFrame struct instance HEAPU32[k + {{{ C_STRUCTS.AudioSampleFrame.numberOfChannels / 4 }}}] = i.length;