Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Worklets fail with STRICT #22971

Open
cwoffenden opened this issue Nov 20, 2024 · 2 comments
Open

Audio Worklets fail with STRICT #22971

cwoffenden opened this issue Nov 20, 2024 · 2 comments

Comments

@cwoffenden
Copy link
Contributor

This is in the latest Emscripten:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.73-git (299be0bbfbbadfa926cb69380f0fffa3703b26c7)

Building any of the Audio Worklet tests with -sSTRICT compiles but fails to run:

emcc -sAUDIO_WORKLET -sWASM_WORKERS -sSTRICT audio_worklet_tone_generator.c

The browser errors being variations of missing API calls, e.g.:

Aborted(`Module.wasmMemory` was supplied but `wasmMemory` not included in INCOMING_MODULE_JS_API)

The suggestion here being to add it:

#22753 (comment)

(This can be assigned to me and I'll look at it)

@sbc100
Copy link
Collaborator

sbc100 commented Nov 20, 2024

I think the fix here is to explicitly add the needed exports to INCOMING_MODULE_JS_API. Something like this:

emscripten/tools/link.py

Lines 1214 to 1216 in e1ce10d

if options.preload_files:
# File preloading uses `Module['preRun']`.
settings.INCOMING_MODULE_JS_API.append('preRun')

e.g:

if settings.AUDIO_WORKLET:
  # The following incomming API elements are using when starting a audio worklet.
  settings.INCOMING_MODULE_JS_API += [ .. .]

@cwoffenden
Copy link
Contributor Author

Thanks, I can take a look next week (and verify which should be added or not, in comparison with an Hello, World).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants