WakeupFromSuspend() public static method

public static WakeupFromSuspend ( ) : AKRESULT
return AKRESULT
Ejemplo n.º 1
0
    private void ActivateAudio(bool activate, bool renderAnyway = false)
    {
        if (AkSoundEngine.IsInitialized())
        {
            if (activate)
            {
                AkSoundEngine.WakeupFromSuspend();
            }
            else
            {
                AkSoundEngine.Suspend(renderAnyway);
            }

            AkSoundEngine.RenderAudio();
        }
    }
Ejemplo n.º 2
0
    private static void ActivateAudio(bool activate)
    {
        if (AkSoundEngine.IsInitialized())
        {
            if (activate)
            {
                AkSoundEngine.WakeupFromSuspend();
            }
            else
            {
                AkSoundEngine.Suspend();
            }

            AkSoundEngine.RenderAudio();
        }
    }
Ejemplo n.º 3
0
    // Enable/Disable the audio when pressing play/pause in the editor.
    private static void OnEditorPlaymodeStateChanged()
    {
        if (ms_Instance != null)
        {
            if (EditorApplication.isPaused)
            {
                AkSoundEngine.Suspend();
            }
            else
            {
                AkSoundEngine.WakeupFromSuspend();
            }

            AkSoundEngine.RenderAudio();
        }
    }
Ejemplo n.º 4
0
    private static void ActivateAudio(bool activate)
    {
        if (ms_Instance != null)
        {
            if (activate)
            {
                AkSoundEngine.WakeupFromSuspend();
            }
            else
            {
                AkSoundEngine.Suspend();
            }

            AkSoundEngine.RenderAudio();
        }
    }
Ejemplo n.º 5
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();
        }
    }
Ejemplo n.º 6
0
    /// <summary>
    /// Only used when counting down.
    /// </summary>
    void Update()
    {
        if (countingDown)
        {
            //Gets the current time.
            DateTime now = DateTime.Now;
            //Updates the visual text.
            unpauseCountdown.text = (int)((countTo - now).TotalSeconds + 1) + "";
            //No longer puased
            if (countTo.CompareTo(now) < 0)
            {
                //Unpause functionality.
                Time.timeScale = 1;
                countingDown   = false;
                unpauseCountdown.gameObject.SetActive(false);
                playerMove.enabled = true;

                // resume sound
                AkSoundEngine.WakeupFromSuspend();

                leftLight.Resume();
                rightLight.Resume();
            }
        }
        if (fadingIn)
        {
            timer += Time.deltaTime;
            Color temp = Color.Lerp(Color.clear, Color.white, timer / fadeInTime);
            multiplier.color       = temp;
            score.color            = temp;
            pauseButtonImage.color = temp;
            if (timer >= fadeInTime)
            {
                fadingIn = false;
                GameState._instance.ResetTimeSinceGameStarted();
                GameState._instance.SetGameOver(false);
            }
        }
    }
Ejemplo n.º 7
0
 public void AudioResume()
 {
     AkSoundEngine.WakeupFromSuspend();
 }
Ejemplo n.º 8
0
 public void AwakeFromSuspend()
 {
     AkSoundEngine.WakeupFromSuspend();
 }