Skip to content

Commit 241ac54

Browse files
authored
[NFC] Grammar fixes in webaudio comments (#23141)
1 parent fe28060 commit 241ac54

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

system/include/emscripten/webaudio.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void emscripten_destroy_web_audio_node(EMSCRIPTEN_WEBAUDIO_T objectHandle);
6262
// Create Wasm AudioWorklet thread. Call this function once at application startup to establish an AudioWorkletGlobalScope for your app.
6363
// After the scope has been initialized, the given callback will fire.
6464
// audioContext: The Web Audio context object to initialize the Wasm AudioWorklet thread on. Each AudioContext can have only one AudioWorklet
65-
// thread running, so do not call this function a multiple times on the same AudioContext.
65+
// thread running, so do not call this function multiple times on the same AudioContext.
6666
// stackLowestAddress: The base address for the thread's stack. Must be aligned to 16 bytes. Use e.g. memalign(16, 1024) to allocate a 1KB stack for the thread.
6767
// stackSize: The size of the thread's stack. Must be a multiple of 16 bytes.
6868
// callback: The callback function that will be run when thread creation either succeeds or fails.
@@ -76,8 +76,8 @@ typedef int WEBAUDIO_PARAM_AUTOMATION_RATE;
7676
typedef struct WebAudioParamDescriptor
7777
{
7878
float defaultValue; // Default == 0.0
79-
float minValue; // Default = -3.4028235e38;
80-
float maxValue; // Default = 3.4028235e38;
79+
float minValue; // Default = -3.4028235e38
80+
float maxValue; // Default = 3.4028235e38
8181
WEBAUDIO_PARAM_AUTOMATION_RATE automationRate; // Either WEBAUDIO_PARAM_A_RATE or WEBAUDIO_PARAM_K_RATE. Default = WEBAUDIO_PARAM_A_RATE
8282
} WebAudioParamDescriptor;
8383

@@ -96,7 +96,7 @@ typedef void (*EmscriptenWorkletProcessorCreatedCallback)(EMSCRIPTEN_WEBAUDIO_T
9696
void emscripten_create_wasm_audio_worklet_processor_async(EMSCRIPTEN_WEBAUDIO_T audioContext, const WebAudioWorkletProcessorCreateOptions *options, EmscriptenWorkletProcessorCreatedCallback callback, void *userData3);
9797

9898
// Returns the number of samples processed per channel in an AudioSampleFrame, fixed at 128 in the Web Audio API 1.0 specification, and valid for the lifetime of the audio context.
99-
// For this to change from the default 128, the context would need creating with a yet unexposed WebAudioWorkletProcessorCreateOptions renderSizeHint, part of the 1.1 Web Audio API.
99+
// For this to change from the default 128, the context would need to be created with a yet unexposed WebAudioWorkletProcessorCreateOptions renderSizeHint, part of the 1.1 Web Audio API.
100100
int emscripten_audio_context_quantum_size(EMSCRIPTEN_WEBAUDIO_T audioContext);
101101

102102
typedef int EMSCRIPTEN_AUDIO_WORKLET_NODE_T;
@@ -148,15 +148,15 @@ bool emscripten_current_thread_is_audio_worklet(void);
148148

149149
#define EMSCRIPTEN_AUDIO_MAIN_THREAD 0
150150

151-
/* emscripten_audio_worklet_function_*: Post a pointer to a C/C++ function to be executed either
152-
on the Audio Worklet thread of the given Web Audio context. Notes:
151+
/* emscripten_audio_worklet_function_*: Post a pointer to a C/C++ function to be executed on the Audio Worklet
152+
thread of the given Web Audio context. Notes:
153153
- If running inside an Audio Worklet thread, specify ID EMSCRIPTEN_AUDIO_MAIN_THREAD (== 0) to pass a message
154154
from the audio worklet to the main thread.
155155
- When specifying non-zero ID, the Audio Context denoted by the ID must have been created by the calling thread.
156156
- Passing messages between audio thread and main thread with this family of functions is relatively slow and has
157157
a really high latency cost compared to direct coordination using atomics and synchronization primitives like
158-
mutexes and synchronization primitives. Additionally these functions will generate garbage on the JS heap.
159-
Therefore avoid using these functions where performance is critical. */
158+
mutexes. Additionally these functions will generate garbage on the JS heap. Therefore avoid using these
159+
functions where performance is critical. */
160160
void emscripten_audio_worklet_post_function_v(EMSCRIPTEN_WEBAUDIO_T id, void (*funcPtr)(void));
161161
void emscripten_audio_worklet_post_function_vi(EMSCRIPTEN_WEBAUDIO_T id, void (*funcPtr)(int), int arg0);
162162
void emscripten_audio_worklet_post_function_vii(EMSCRIPTEN_WEBAUDIO_T id, void (*funcPtr)(int, int), int arg0, int arg1);

0 commit comments

Comments
 (0)