Skip to content

Commit 22165af

Browse files
committed
rebaseline
2 parents 8185db1 + 3b8d3fa commit 22165af

22 files changed

+42
-46
lines changed

docs/emcc.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Options that are modified or new in *emcc* are listed below:
252252
"--closure 0|1|2"
253253
[link] Runs the *Closure Compiler*. Possible values are:
254254

255-
* "0": No closure compiler (default in "-O2" and below).
255+
* "0": No closure compiler (default).
256256

257257
* "1": Run closure compiler. This greatly reduces the size of
258258
the support JavaScript code (everything but the WebAssembly or
@@ -277,9 +277,6 @@ Options that are modified or new in *emcc* are listed below:
277277
before the closure-compiled code runs, because then it will
278278
reuse that variable.
279279

280-
* Closure is only run if JavaScript opts are being done ("-O2" or
281-
above).
282-
283280
"--closure-args=<args>"
284281
[link] Pass arguments to the *Closure compiler*. This is an
285282
alternative to "EMCC_CLOSURE_ARGS".

site/source/docs/tools_reference/emcc.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,14 @@ Options that are modified or new in *emcc* are listed below:
262262
[link]
263263
Runs the :term:`Closure Compiler`. Possible values are:
264264

265-
- ``0``: No closure compiler (default in ``-O2`` and below).
265+
- ``0``: No closure compiler (default).
266266
- ``1``: Run closure compiler. This greatly reduces the size of the support JavaScript code (everything but the WebAssembly or asm.js). Note that this increases compile time significantly.
267267
- ``2``: Run closure compiler on *all* the emitted code, even on **asm.js** output in **asm.js** mode. This can further reduce code size, but does prevent a significant amount of **asm.js** optimizations, so it is not recommended unless you want to reduce code size at all costs.
268268

269269
.. note::
270270

271271
- Consider using ``-sMODULARIZE`` when using closure, as it minifies globals to names that might conflict with others in the global scope. ``MODULARIZE`` puts all the output into a function (see ``src/settings.js``).
272272
- Closure will minify the name of `Module` itself, by default! Using ``MODULARIZE`` will solve that as well. Another solution is to make sure a global variable called `Module` already exists before the closure-compiled code runs, because then it will reuse that variable.
273-
- Closure is only run if JavaScript opts are being done (``-O2`` or above).
274273

275274
``--closure-args=<args>``
276275
[link]

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);

system/lib/jsmath.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#include <math.h>
77
#include <stdlib.h>
88

9-
#define CALL_JS_1(cname, jsname, type, casttype) \
9+
#define CALL_JS_1(cname, jsname, type) \
1010
EM_JS(type, JS_##cname, (type x), { return jsname(x) }); \
11-
type cname(type x) { return JS_##cname((casttype)x); }
11+
type cname(type x) { return JS_##cname(x); }
1212

1313
#define CALL_JS_1_TRIPLE(cname, jsname) \
14-
CALL_JS_1(cname, jsname, double, double) \
15-
CALL_JS_1(cname##f, jsname, float, float)
14+
CALL_JS_1(cname, jsname, double) \
15+
CALL_JS_1(cname##f, jsname, float)
1616

1717
CALL_JS_1_TRIPLE(cos, Math.cos)
1818
CALL_JS_1_TRIPLE(sin, Math.sin)
@@ -27,24 +27,24 @@ CALL_JS_1_TRIPLE(fabs, Math.abs)
2727
CALL_JS_1_TRIPLE(ceil, Math.ceil)
2828
CALL_JS_1_TRIPLE(floor, Math.floor)
2929

30-
#define CALL_JS_2(cname, jsname, type, casttype) \
30+
#define CALL_JS_2(cname, jsname, type) \
3131
EM_JS(type, JS_##cname, (type x, type y), { return jsname(x, y) }); \
32-
type cname(type x, type y) { return JS_##cname((casttype)x, (casttype)y); }
32+
type cname(type x, type y) { return JS_##cname(x, y); }
3333

3434
#define CALL_JS_2_TRIPLE(cname, jsname) \
35-
CALL_JS_2(cname, jsname, double, double) \
36-
CALL_JS_2(cname##f, jsname, float, float)
35+
CALL_JS_2(cname, jsname, double) \
36+
CALL_JS_2(cname##f, jsname, float)
3737

3838
CALL_JS_2_TRIPLE(atan2, Math.atan2)
3939
CALL_JS_2_TRIPLE(pow, Math.pow)
4040

41-
#define CALL_JS_1_IMPL(cname, type, casttype, impl) \
41+
#define CALL_JS_1_IMPL(cname, type, impl) \
4242
EM_JS(type, JS_##cname, (type x), impl); \
43-
type cname(type x) { return JS_##cname((casttype)x); }
43+
type cname(type x) { return JS_##cname(x); }
4444

4545
#define CALL_JS_1_IMPL_TRIPLE(cname, impl) \
46-
CALL_JS_1_IMPL(cname, double, double, impl) \
47-
CALL_JS_1_IMPL(cname##f, float, float, impl)
46+
CALL_JS_1_IMPL(cname, double, impl) \
47+
CALL_JS_1_IMPL(cname##f, float, impl)
4848

4949
CALL_JS_1_IMPL_TRIPLE(round, {
5050
return x >= 0 ? Math.floor(x + 0.5) : Math.ceil(x - 0.5);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
128911
1+
128974
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
128360
1+
128423
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
171023
1+
171008
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
142224
1+
142223
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
144811
1+
144810
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
121868
1+
121924

0 commit comments

Comments
 (0)