File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ function createWasmAudioWorkletProcessor(audioParams) {
43
43
// may be required (with an arbitrary maximum of 16, for the case where a
44
44
// multi-MB stack is passed), allocated at the *top* of the worklet's
45
45
// stack (and whose addresses are fixed).
46
- this . maxBuffers = Math . min ( ( Module [ 'sz' ] / ( this . samplesPerChannel * 4 ) ) | 0 , /*sensible limit*/ 16 ) ;
46
+ this . maxBuffers = Math . min ( ( ( Module [ 'sz' ] - /*stack guards?*/ 16 ) / ( this . samplesPerChannel * 4 ) ) | 0 , /*sensible limit*/ 16 ) ;
47
47
// These are still alloc'd to take advantage of the overflow checks, etc.
48
48
var oldStackPtr = stackSave ( ) ;
49
49
var viewDataIdx = stackAlloc ( this . maxBuffers * this . samplesPerChannel * 4 ) >> 2 ;
@@ -144,6 +144,7 @@ function createWasmAudioWorkletProcessor(audioParams) {
144
144
}
145
145
146
146
#if ASSERTIONS
147
+ // TODO: addresses are now wrong
147
148
k = outputDataPtr ;
148
149
for ( i = outputViewsNeeded - 1 ; i >= 0 ; i -- ) {
149
150
console . assert ( this . outputViews [ i ] . byteOffset == k , 'Internal error in addresses of the output array views' ) ;
You can’t perform that action at this time.
0 commit comments