Skip to content

Commit 90c4bae

Browse files
committed
Reverted assignments to the original order
1 parent 49ad4d1 commit 90c4bae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/audio_worklet.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ function createWasmAudioWorkletProcessor(audioParams) {
112112

113113
// Copy input audio descriptor structs and data to Wasm
114114
inputsPtr = dataPtr;
115-
dataPtr += numInputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}};
116115
k = inputsPtr >> 2;
116+
dataPtr += numInputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}};
117117
for (i of inputList) {
118118
// Write the AudioSampleFrame struct instance
119119
HEAPU32[k + {{{ C_STRUCTS.AudioSampleFrame.numberOfChannels / 4 }}}] = i.length;
@@ -129,8 +129,8 @@ function createWasmAudioWorkletProcessor(audioParams) {
129129

130130
// Copy parameters descriptor structs and data to Wasm
131131
paramsPtr = dataPtr;
132-
dataPtr += numParams * {{{ C_STRUCTS.AudioParamFrame.__size__ }}};
133132
k = paramsPtr >> 2;
133+
dataPtr += numParams * {{{ C_STRUCTS.AudioParamFrame.__size__ }}};
134134
for (i = 0; paramArray = parameters[i++];) {
135135
// Write the AudioParamFrame struct instance
136136
HEAPU32[k + {{{ C_STRUCTS.AudioParamFrame.length / 4 }}}] = paramArray.length;
@@ -144,8 +144,8 @@ function createWasmAudioWorkletProcessor(audioParams) {
144144
// Copy output audio descriptor structs to Wasm (note that dataPtr after
145145
// the struct offsets should now be 16-byte aligned).
146146
outputsPtr = dataPtr;
147-
dataPtr += numOutputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}};
148147
k = outputsPtr >> 2;
148+
dataPtr += numOutputs * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}};
149149
for (i of outputList) {
150150
// Write the AudioSampleFrame struct instance
151151
HEAPU32[k + {{{ C_STRUCTS.AudioSampleFrame.numberOfChannels / 4 }}}] = i.length;

0 commit comments

Comments
 (0)