I'm trying to suspend the audioengine when the app goes into background on iOS.
I'm using the OnApllicationPause Callback in Unity like so:
void OnApplicationPause(bool paused)
{
if (paused)
{
AkSoundEngine.Suspend();
Debug.Log("ApplicationPaused" + paused);
} else {
AkSoundEngine.WakeupFromSuspend();
Debug.Log("ApplicationBack" + paused);
}
}
I'm getting the following Error:
AK Error: Sound engine is not initialized or dummy sink is in use. Aborted.