Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Wwise in Unity - Sound while minimized [closed]

0 votes
My game sound will play just fine when using the Unity Editor to "play" the game, but as soon as I build the game and try to play the sound mutes while in the background or minimized. I thought this was a Unity related issue, but it appears to have become more frequent recently among many developers. It's worth noting that my Run in Background settings are set in Unity and scripted to check for and update in the code every frame.
closed with the note: Solved the answer myself. Leaving for others to see.
asked May 30, 2017 in General Discussion by Jeremy M. (170 points)
closed May 30, 2017 by Jeremy M.

1 Answer

0 votes
 
Best answer
Looking over the C++ documentation there are two functions that have managed to work well for this solution.

        AkSoundEngine.WakeupFromSuspend();
        AkSoundEngine.RenderAudio();

Both of these called at the start of the update function will allow the game to continue running in the background (in combination with Unity application background calls) and continue the sound playback.
answered May 30, 2017 by Jeremy M. (170 points)
selected May 30, 2017 by Fabien B. (Audiokinetic)
...