Skip to content

Commit 7981b70

Browse files
committed
More docs clarification
1 parent 8a036f4 commit 7981b70

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

site/source/docs/api_reference/wasm_audio_worklets.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@ and then, these processors are instantiated one or more times in the audio
4444
processing graph as AudioWorkletNodes.
4545

4646
Once a class type is instantiated on the Web Audio graph and the graph is
47-
running, a C/C++ function pointer callback will be invoked for each 128
48-
samples of the processed audio stream that flows through the node. Newer Web
49-
Audio API specs allow this to be changed, so for future compatibility use the
50-
``AudioSampleFrame``'s ``samplesPerChannel`` to get the value (and request the
51-
preferred number of samples with ``EmscriptenWebAudioCreateAttributes``'s
52-
``renderSizeHint`` option).
47+
running, a C/C++ function pointer callback will be invoked for each N samples
48+
of the processed audio stream that flows through the node (where N is is the
49+
number of samples per channel, exposed as ``AudioSampleFrame``'s
50+
``samplesPerChannel``, always 128 in the 1.0 Web Audio API, though with the 1.1
51+
API ``emscripten_create_audio_context()`` accepts a ``renderSizeHint`` option).
5352

5453
This callback will be executed on a dedicated separate audio processing
5554
thread with real-time processing priority. Each Web Audio context will

0 commit comments

Comments
 (0)