HTML5 - Audio Stutter on Start (Chrome)

I have FMOD working in Chrome, but when audio first starts playing whether the first interaction with the page is starting the music event by click, or if I interact with the page first and then start the music event, there is a brief stutter. I don’t believe it is a problem with my banks since it does this regardless if it is FADPCM or Vorbis, and it happens whether it is streaming or decompressed. I am using the iOS/Chrome workaround by suspending the mixer and resuming it on the first click. Also there are two streams of music playing simultaneously. I think it might be a problem with trying to access the audio data before it finishes loading, but I wouldn’t know how to confirm this. What could I be doing wrong? Thanks for your time.

Update: My code works fine in Edge, so this may well be a problem with the Chrome/iOS workaround. (Also I forgot to mention I am using FMOD 1.10.10 and the FMOD JS file is fmodstudio.js).

For now I would delay the audio playback for the first few hundred ms , as there looks like an unavoidable delay between updates - which need to be very close together to produce smooth audio. It would be like if during the middle of a game the update call stalled, the audio would start to stutter.
The delay could be done by game logic or a volume mute could be performed for the first 500ms or so of starting, but you might miss the start of sounds/music if you do that.

I have experienced the stutter before, most noticeably with the unity integration because I think the start up of unity was taking a lot of cpu time, so i’ll look at some internal solution or at least some example code/documentation if it turns out the fmod updates just arent happening in time.

Hello Aishi,

I’m trying to use FMOD with HTML5 and I’m having a problem as soon as I call FMOD.System_Create, how did you manage to make it work?

Here’s the post in which I describe my problem: [HTML5 System_Create] [ERR] assert: assertion: ‘mCrit[crit]’ failed

Thank you very much :pray: