Ejemplo n.º 1
0
 //Funcion encargada de detener un sonido
 public void Stop(FMOD.Studio.STOP_MODE stopType)
 {
     if (instance.isValid() && isPlaying())
     {
         instance.stop(stopType);
     }
 }
    private IEnumerator StopAudioRoutine(EventInstance instance, StopMode stopMode)
    {
        yield return(new WaitForSeconds(INSTANCE_RELEASE_DELAY));

        if (!instance.isValid())
        {
            yield break;
        }
        instance.stop(stopMode);
    }
        private void StopSound(FMOD.Studio.STOP_MODE stopMode)
        {
            if (outputEventInstance.isValid())
            {
                outputEventInstance.stop(stopMode);
                outputEventInstance.release();

                if (feeder != null)
                {
                    feeder.ReportOutputStop(this);
                }
            }
        }
Ejemplo n.º 4
0
    public static EventInstance Stop(EventInstance instance, FMOD.Studio.STOP_MODE stopMode)
    {
        if (instance.isValid())
        {
            instance.stop(stopMode);
            instance.release();
        }
        else
        {
            Debug.LogError("No Instance was found!");
        }

        return(instance);
    }
    public virtual void StopPersistentAudio(string audioEventName, StopMode stopMode = StopMode.IMMEDIATE)
    {
        const string logMethod = "StopPersistentAudio";

        if (string.IsNullOrEmpty(audioEventName))
        {
            Debug.LogErrorFormat(DEBUG_LOG_FORMAT, logMethod, "Audio event name is not provided.");
            return;
        }

        var instance = GetExistingInstance(audioEventName);

        if (!instance.isValid())
        {
            return;
        }

        instance.stop(stopMode);
        StartCoroutine(StopAudioRoutine(instance, stopMode));
    }
Ejemplo n.º 6
0
 /// <summary>
 /// 사운드를 정지합니다.
 /// </summary>
 public void Stop(FMOD.Studio.STOP_MODE SM) => bgm.stop(SM);
Ejemplo n.º 7
0
 public void StopSound(SoundTypes sound, FMOD.Studio.STOP_MODE stopMode)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 8
0
 public void StopEvent(int eventID, FMOD.Studio.STOP_MODE mode)
 {
     m_SpawnedInstances[eventID].stop(mode);
 }
 public static void StopMusic(FMOD.Studio.STOP_MODE mode = FMOD.Studio.STOP_MODE.IMMEDIATE)
 {
     Instance.MainAudioSource.stop(mode);
 }