menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

0 votes
When running a build and tabbing away from the game window, the game continues silently, however during this time the audio event triggers will be stacking. When the game window regains focus, all these events will suddenly play together at the same time, up to around 600 of them which is the max queue limit. I can see them queuing in the Wwise profiler, but this isn't the behaviour I want. I have "Render During Focus Loss" checked in Unity, but the audio isn't playing/stopping as it should when the game window isn't in focus. I don't care if it's silent, I just want it to not stack and suddenly play masses of audio when you switch back to the window.
dans General Discussion par Adam C. (120 points)

2 Réponses

0 votes
Any solutions for this?
par Robert E. (550 points)
0 votes
For anyone who is encountering this issue and doesn't know how to solve it, one way (and the way I am currently using) is to use OnApplicationFocus(bool focus) which is a method accessible from any MonoBehaviour and lets you know when the application is focused or not (I.e. tabbed in) this way you could just choose not to play any new sounds when the user is tabbed out.

Docs for its use here: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationFocus.html
par John B. (140 points)
...