Hello, I am trying the web sample of FMOD and I am getting the below exception.
Uncaught TypeError: Cannot read properties of undefined (reading 'addModule')
at Array.ASM_CONSTS (fmodstudio.js:9:15958)
at _emscripten_asm_const_i (fmodstudio.js:9:22726)
...
I got the web demo I got a long time ago and was only using it for experimentation, so I got it back and checked it out, and it works well.
So, starting with 2.02, I slowly downgraded the version to find the point where this issue occurred, and I found that eventually, it worked safely until 2.01.13.
As of 2.01.14, the demo raised the above exception.
Regarding this, I would like to know what has changed in between and how to respond.
My own simple host application with ASP.NET Core 6
Entire FMOD Studio library examples
I’ll try another hosting app/service later, if I get same issue, I’ll post about it with details.
+ Can I use fmodstudio.js with minor modification?
I tried wasm upstream build to NW.js, it doesn’t work because it detected as Node environment but __dirname not supported on NW.js.
So I modified this to force detected as web client environment to work.
Thank you for the additional information, I have reproduced these errors in ASP.NET with all but the core User Created Sound example; and although that one isn’t throwing any errors it is not outputting any audio. I have also been having issues serving audio files from ASP.NET, so it looks like there are a few things that we’ll need to investigate here- I have passed this onto the Dev team to look into.
As for your question about modifying fmodstudio.js, you can change it if you need to, but ideally you shouldn’t need to, so if you have any suggestions on things we can change to improve portability to different web frameworks that we haven’t tested on then we can look into it.
NW.js is ‘like’ Node’s environment, so any FMOD HTML5 build was not work as expected in NW.js.
I’ll clean this up in another thread, thanks for checking it out!