Exemplo n.º 1
0
 void OnGUI()
 {
     if (ms_isAudioSessionInterrupted && Input.touchCount > 0)
     {
         AKRESULT res = AkSoundEngine.ListenToAudioSessionInterruption(false, false);
         if (res == AKRESULT.AK_Success || res == AKRESULT.AK_Cancelled)
         {
             Debug.Log("Wwise: App audio restored or already restored.");
             ms_isAudioSessionInterrupted = false;
         }
     }
 }
Exemplo n.º 2
0
    //On the WiiU, it seems Unity has a bug and never calls OnApplicationFocus(true).  This leaves us in "suspended mode".  So commented out for now.
    void OnApplicationPause(bool pauseStatus)
    {
#if UNITY_IOS
        AkSoundEngine.ListenToAudioSessionInterruption(pauseStatus);
#endif
        if (ms_Instance != null)
        {
            if (!pauseStatus)
            {
                AkSoundEngine.WakeupFromSuspend();
            }
            else
            {
                AkSoundEngine.Suspend();
            }
            AkSoundEngine.RenderAudio();
        }
    }
Exemplo n.º 3
0
 void OnApplicationPause(bool pause)
 {
     AkSoundEngine.ListenToAudioSessionInterruption(pause);
 }