MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / process

Function process

src/audio_worklet.js:96–114  ·  view source on GitHub ↗

@suppress {checkTypes}

(inputList, outputList)

Source from the content-addressed store, hash-verified

94#else
95 /** @suppress {checkTypes} */
96 process(inputList, outputList) {
97#endif
98
99#if ALLOW_MEMORY_GROWTH && GROWABLE_ARRAYBUFFERS != 2
100 // Recreate the output views if the heap has changed
101 if (HEAPF32.buffer != this.outputViews[0].buffer) {
102 this.createOutputViews();
103 }
104#endif
105
106 var numInputs = inputList.length;
107 var numOutputs = outputList.length;
108
109 var entry; // reused list entry or index
110 var subentry; // reused channel or other array in each list entry or index
111
112 // Calculate the required stack and output buffer views (stack is further
113 // split into aligned structs and the raw float data).
114 var stackMemoryStruct = (numInputs + numOutputs) * {{{ C_STRUCTS.AudioSampleFrame.__size__ }}};
115 var stackMemoryData = 0;
116 for (entry of inputList) {
117 stackMemoryData += entry.length;

Callers 4

audio_worklet.jsFile · 0.70
PortClass · 0.50
ClientMethod · 0.50
ServerMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected