The documentation states that there is a function emscriptenRegisterAudioObject() that can be used to pass an AudioContext instance from JavaScript to WebAssembly:
In a larger application that integrates existing Web Audio libraries, you may already have an AudioContext created via some other library, in which case you would instead register that context to be visible to WebAssembly by calling the function emscriptenRegisterAudioObject().
The documentation states that there is a function
emscriptenRegisterAudioObject()
that can be used to pass an AudioContext instance from JavaScript to WebAssembly:https://emscripten.org/docs/api_reference/wasm_audio_worklets.html#programming-example
How can I export this function? I have tried adding it to EXPORTED_RUNTIME_METHODS as follows:
However this results in the following warning:
warning: invalid item in EXPORTED_RUNTIME_METHODS: emscriptenRegisterAudioObject