WebGL - TypeError: Module.waitForAudioWorklet is not a function

Unity 6.0 and FMOD 2.03.07

When I try to run a WebGL build in Firefox, I get this error.

I’ve tried

  • Disabling code stripping
  • Using a previous version of FMOD (just upgraded from 2.02 to 2.03 to see if that fixed this)

But so far, no luck getting around it. Has anyone experienced this?

Edit: Doing some tests:

  • Using the same Unity and FMOD versions in a clean, new project; No error. Tested with a single event.
  • Comparing the FMOD plugin folders of both projects; All files identical except cache and settings file.

Edit2: Solved:

  • I had DSP buffer settings set to 128 samples x 4 (this yields an error)
  • Upping samples to 512 fixes it, or checking “auto”.

Thanks, the message was cryptic so i’ve done an update to make it not print that - it should return an initialization error as normal, and the logging version of FMOD would produce something like

fmodL.js:8 [LOG] SystemI::init                            : Initialize version=20308 (121212), maxchannels=1024, flags=0x00000000
fmodL.js:8 [ERR] OutputAudioWorklet::init::init           : DSP Buffer size (128) must be a power of two between 256 and 16384.
fmodL.js:8 [LOG] SystemI::closeInternal                   : Closed.