[WebGL] Stuttering audio too problematic with FMOD

There are a few things you could try, but at the end of the day WebGL is a single-threaded environment with no access to the GPU and, as you mentioned, varying performance between browsers. Some things to try:

  • Never have more than one streaming asset playing at a time.
  • Preload banks/events before gameplay, and unload anything you don’t need.
  • Where possible, reduce the Max Instances count and use a relevant Voice Stealing option to compensate for dropouts.
  • Avoid convolution reverb.
  • Increase the DSP Buffer Length in the FMOD Unity settings for WebGL

40ms is the default for most platforms, with a DSP Buffer Length of 512 and DSP Buffer Count of 4. A DSP Buffer Length of 2048 and DSP Buffer Count of 4 would give you a 170ms of latency. Whether or not that is an acceptable amount of latency for your case is something to be determined with user testing.

1 Like