Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

Based on Unity 2018.4.14, Wwise 2019.2.2

I'm trying to play BGM in the game. (We use different states to control the different music.)
The following is my codes' steps:
1. PrepareBank
2. PrepareEvent
3. PostEvent
4. PrepareGameSyncs
5. SetState
No sounds come out.
So I set a break point after the bank was prepared successfully to pause the Game. Then start the wwise communication with unity to see the errors. Resume the game after wwise and unity is connected.
But no errors shown up in the Capture-Log-View. There are only two lines of logs:
Prepare event request received (Array size = 1)
Failed to prepare event

There is also no errors in visual studio. But the callback's the argument in_eLoadResult is AK_Fail.

in General Discussion by Isabella D. (260 points)
edited by Isabella D.

1 Answer

0 votes
 
Best answer

1. Make sure the enable_game_sync_preparation setting is on.
Unity Editor -> Edit -> Project Settings -> Wwise Initialization -> Enable Game Sync Preparation
But in my case, it was still going wrong.

2. Finally, I found out that the order matters.
I should PrepareGameSync before PrepareEvent.
The sound comes out when the order is 1-4-2-3-5, while no sound comes out when the order is 1-2-4-3-5.
It is inconsistent with the notes of official website:

The order in which you call AK::SoundEngine::PrpareEvent and AK::SoundEngine::PrepareGameSync is not important.

So, the official website notes is misleading, or it is a wwise's bug?

by Isabella D. (260 points)
So, I finally get this.
When the media is controlled by more than one State, I should have prepared every group before play the event.
It's true that the order to call PrepareEvent and PrepareGameSyncs does not matter.
...