Answered
0
0

Hi,

I’ve noticed on the documentation that there are two functions to suspend/resume the mixer thread when the application window loses focus:
https://www.fmod.org/docs/content/generated/FMOD_System_MixerResume.html
https://www.fmod.org/docs/content/generated/FMOD_System_MixerSuspend.html

Is this only used on mobile platforms? We have generated a Desktop build with Unity and noticed the audio doesn’t stop when the application window loses focus. Should Fmod_StudioSystem take care of this or is there any other way to implement?

Cheers.

  • You must to post comments
Best Answer
0
0

Correct those functions only apply to mobile platforms. If you want your game to pause all audio on all platforms, get the master bus and use Bus.setPaused() inside an OnApplicationPause() event handler.

We added exactly this behaviour as the default in 1.08.07, but I doubt you want to switch from the legacy integration for something that can done in a few lines of script.

  • You must to post comments
0
0

Thanks, we implemented as you described and it worked like a charm! :)

Cheers.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.