Skip to content

Commit 7ed425e

Browse files
authored
[AUDIO_WORKLET] Added TODO for max_align_t/minimum alloc NFC (#25128)
This is a minor docs only change, since I spotted `max_align_t` had already changed before and may affect this.
1 parent f78366c commit 7ed425e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/audio_worklet.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ function createWasmAudioWorkletProcessor(audioParams) {
4242
// Prepare the output views; see createOutputViews(). The 'minimum alloc'
4343
// firstly stops STACK_OVERFLOW_CHECK failing (since the stack will be
4444
// full if we allocate all the available space, with 16 bytes being the
45-
// minimum allo size due to alignments) leaving room for a single
45+
// minimum alloc size due to alignments) leaving room for a single
4646
// AudioSampleFrame as a minumum. There's an arbitrary maximum of 64, for
4747
// the case where a multi-MB stack is passed.
48+
// TODO: if max_align_t changes the minimum alloc will need readdressing
4849
this.outputViews = new Array(Math.min(((wwParams.stackSize - /*minimum alloc*/ 16) / this.bytesPerChannel) | 0, /*sensible limit*/ 64));
4950
#if ASSERTIONS
5051
console.assert(this.outputViews.length > 0, `AudioWorklet needs more stack allocating (at least ${this.bytesPerChannel})`);

0 commit comments

Comments
 (0)