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.

+1 vote
I have a character that has ambient sounds come from them. Unfortunately these, and all other sounds, stop when leaving a level streaming volume in UE4. The stop all event is called.  Where can we intercept this and make it so that the stop all function is not called? Or a way that we can change it, that if a level is unloaded/destroyed in this fashion?

 

-Rob
dans General Discussion par Robert M. (4.6k points)
edité par Robert M.

2 Réponses

+3 votes
Hi Rob, i'm having a similar issue. What i found out is that AkAudioDevice registers to the LevelRemovedFromWorld callback. If this callback is called, AkAudioDevice will call its flush method and, like you said, will call StopAll from wwise api.

In our case, we are streaming levels when moving forward in the map. When the streaming happens, the callback gets called.

I didn't find any solution for our specific case. I might try filtering the Flush method if some specific levels are removed but not all.

I would be curious to know if you found any solution to your problem.

Cheers,
par Francois P. (200 points)
We ran into a similar problem and had to comment out the implementation of FAkAudioDevice::OnLevelRemoved to avoid the unwanted StopAll calls interfering with, say, looping ambient sounds as various unrelated sub-levels were loaded and unloaded into the main level.  Rather, we called Flush directly from higher-level logic in our game module explicitly associated with the main level unload.  Game-specific to be sure, but equivalent to Fracois’ suggestion of adjusting OnLevelRemoved’s behaviour dependent on Inlevel.
+1 vote
void FAkAudioDevice::OnLevelRemoved(ULevel* InLevel, UWorld* InWorld)
{
    if (InLevel && InLevel->IsPersistentLevel())
    {
        Flush(NULL);
    }
}

 

 

Hey guys ^ that is the code my programmer was able to implement in akaudiodevice.cpp. He just recently learned about level unloading and loading so was finally able to help me out on this one. But this code basically checks if the level is the main persistent level. If so then unload, if not then don't unload. This has one draw back though, certain sounds say like ambient sounds in a room that should not continue on in another room do not turn off. So you will just have to create a custom BP to take care of that for you so you don't overload the system.

 

-Rob
par Robert M. (4.6k points)
Thanks for following up Robert. This should do the trick. On our side, we simply removed the flush since they were no drawback of doing so in the context of our game.
Thanks for the follow up Robert as I just discovered this today.

Sadly I haven't got time to dig more into this to see how it's should be properly be used.
Hi there, we are in 2022, am I wrong saying this issue is still true ? I have the exact same issue and can't figure out other solution than maybe adding this piece of code...
In our system, we could see that this bug was fixed in 2016.1.2 as "WG-30304 Fixed: "Unload stream level" no longer posts a global "Stop All" to the SoundEngine."
https://www.audiokinetic.com/library/2019.2.14_7616/?source=UE4&id=releasenotes_2016_1_2.html
If you are encountering this issue, you might be facing a different issue or this issue came back as a side-effect of other changes. You can report the issue through a Bug Report (https://www.audiokinetic.com/library/edge/?source=InstallGuide&id=reporting_bugs) where you can share how you reproduce the issue and which versions of the product you are using.
...