Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

0 votes

When our Unity-powered game loses window focus, Wwise suspends the sound engine, and no sound is heard. But when the window regains focus, we get a spamming of all of the sound events that were posted while the game was still running in the background.

  • Is there a way to tell Wwise not to suspend when focus is lost?
  • Or, a way to ignore posted events that occur when the focus is lost?
Thanks.
dans General Discussion par Bob B. (130 points)

2 Réponses

0 votes
Has anyone found a solution for this?
par Robert E. (550 points)
0 votes

In general, this is something to be implemented in the game's code depending on the desired outcome when the application is in the background.
The relevant general documentation can be found here: https://www.audiokinetic.com/en/library/edge/?source=SDK&id=workingwithsdks_system_calls.html#system_calls_background

In this case, if the game is allowed to keep sending events to Wwise (its game loop still runs), AK::SoundEngine::Suspend(true) is the call that should be made to allow the processing of those events, while still muting the sound.
This is activated in the Unity integration through the "RenderDuringFocusLoss" platform setting.

Instead, if on focus loss the game loop is paused, then no events can be sent to Wwise and AK::SoundEngine::Suspend(false) should be called, so that all Wwise events processing is stopped. RenderDuringFocusLoss will achieve this outcome.

For reference, the Unity integration code responsible for this handling in is located in Assets/Wwise/MonoBehavior/Runtime/AkSoundEngineController.cs.

par Samuel L. (Audiokinetic) (23.6k points)
What should I do if I want to deal with certain events specifically?
...