Html5 fmod optimisation (smartphones)

Hi!

Back here again.
So, it seems like what we are doing with our sound banks is really CPU heavy for smartphones. The sounds stutter quite a lot everytime we call a change of parameter value… We tried playing with the DSP Buffer Size (and we’re kind of happy with what we ended setting up as it is much better than the result we had before) but it is not enough to solve all the stuttering.
Which are the other options we could try ?

Hi, It sounds a bit more like the bank encoding settings. What format are you using? I would only recommend PCM or FADPCM on html5 on mobile.

Also lower your voice count with System::setSoftwareChannels, so that less mixing is happening, and they go ‘virtual’ when playing lots of sounds (by order of audibility/importance).

1 Like

Hello,

Thanks for your answer.
We were using fdapcm already. I will try setting the channel count and we will try using pcm instead to see if it can make things better.

Hi !
So we tried using pcm, lowering channels count even to really low values without much better result… Any other option we can try ?

What is a lower value for you? If you had 2 to 8 voices active, i’d be surprised it used any significant cpu usage. Have you used System::getCPUUsage / FMOD_System_GetCPUUsage yet? What is the output rate and speaker mode? It should be stereo (FMOD_SPEAKERMODE_STEREO) and 24-44khz to save cpu time.

What is a lower value for you? If you had 2 to 8 voices active, i’d be surprised it used any significant cpu usage. Have you used System::getCPUUsage / FMOD_System_GetCPUUsage yet? What is the output rate and speaker mode? It should be stereo (FMOD_SPEAKERMODE_STEREO) and 24-44khz to save cpu time.

Hi !
I haven’t used the getCPUUsage function, but i can sure give it a go.
When I said really low values I meant 4. I can try to set it to 2 and see what happens.

Thanks for your help :slight_smile:

2 or 4 is not really any different, and I was not saying to hard limit fmod to that many voices, i was just reflecting on how many voices were actually playing at the time, if it was 2 to 8 it would be not noticable, unless you were using vorbis encoding maybe. You would not down force the number of voices to 2 unless you had a very limited audio environment. Checking getCPUUsage and getChannelPlaying is a good start to see if you’ve accidentally spawned too many voices.