GoogleChromeLabs / web-audio-samples

Web Audio API samples by Chrome Web Audio Team
https://bit.ly/web-audio-samples
Apache License 2.0
672 stars 192 forks source link

Fix Emscripten runtime failure #349

Closed hoch closed 7 months ago

hoch commented 7 months ago

Fixes #348.

The latest stable of Emscripten 3.1.47 caused some runtime errors in the WASM SuperSaw example, and this PR fixes the problem. The details can be found here: https://github.com/GoogleChromeLabs/web-audio-samples/issues/348#issuecomment-1791272814

mjwilson-google commented 7 months ago

This is a huge diff and the Emscripten install instructions are installing 3.1.47 for me, so it might take a few days for me to work through this.

hoch commented 7 months ago

synth.wasm.js is machine-generated and you do not need to review.

The latest ToT can be installed by:

./emsdk install tot
mjwilson-google commented 7 months ago

Thank you, I now have 3.1.48-git installed. The make reports that it succeeds, but I don't see an index.html file to serve. Is there another step to convert the index.njk file?

hoch commented 7 months ago

For that, you can follow the top-level instruction: https://github.com/GoogleChromeLabs/web-audio-samples/#how-to-make-changes-and-depoly

In short, do this in the terminal and run the example:

npm run start

I guess this PR is a good excuse to learn how to build/deploy the web-audio-samples project! :)

mjwilson-google commented 7 months ago

Thank you, I was able to reproduce the bug and verify the fix. LGTM!