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
If the user changes language setting... I need to change the VO sound bank. Unload the current one and load a new one..  but Wwise seems to ignore my load.

I mave main bank and VO bank. I first unload the VO bank using AkBank.Unload(), then change the language setting, then call HandleEvent() on AkBank script to force re-load of the new language bank

but it continues to play sounds from the old language bank.

So how do you remove and reload a new bank at run time ?   

I also tried calling initialize again on AkBankManager...  but it does not let you if there is existing instance, and it also warns not to destroy the instance if its already initialized... so how to swap a bank at runtime please ?

..update...

added some prints...  looks like UnloadBank is not unloading the bank, as when I try to reload it... it says its already loaded.  I am using the correct name to unload it. soo... how to unload it ?

..update 2...

It gets into the AkBankManager.UnloadBank() function...  then it calls Mutex.WaitOne()   which blocks the thread..  then it never seems to come back to print any prints after that (or to actually unload the Bank.

So... what to do now ?...

help appreciated.  Cheers
dans General Discussion par Jon H. (160 points)
edité par Jon H.
Update... looks like Mutex gets stuck forever unless you stop all sound playing on all sound banks, even if the bank you are unloading isn't playing any audio...  that is a bug perhaps.
So call AkSoundEngine.StopAll(); before calling bankVO.UnloadBank()
Second problem now... When I call unload, it says there are 2 refs to the bank, so it removes 1 ref, and still does not unload it.  I only have one ref / one AkBank script with that bank, so not sure where the other ref is coming from.  getting closer...
solved it. AkBankManager()LoadBank() has some dodgy code regarding not unloading a bank scheduled to be unloaded. It doesn't check if the language changed!  so the solution is to Unload your bank, change language, Wait a while (until its definitely unloaded) then load the new language bank.

 

Unity3D Soln..

AkSoundEngine.StopAll();   //do this or Unload() will fail or get stuck in thread, due to a mutex function in there.

AkBankManager.UnloadBank(bankName);

AkSoundEngine.SetCurrentLanguage(newLangName);

wait a while...  // I did .25s but probably a frame or so is ok.

AkBankManager.LoadBank(bankName);     //re-load the VO bank

//don't forget to re-start any music tracks
Thank you for this.  yield return new WaitForEndOfFrame(); did it for me. Didn't need to change the language.

Please sign-in or register to answer this question.

...