Ejemplo n.º 1
0
 public void StopLoops(EventType soundType, FMOD.Studio.STOP_MODE stopMode = FMOD.Studio.STOP_MODE.ALLOWFADEOUT)
 {
     while (dictionary[soundType].eventQueue.Count > 0)
     {
         StopLoop(soundType, stopMode);
     }
 }
Ejemplo n.º 2
0
        public void StopVoiceover(FMOD.Studio.STOP_MODE stopMode)
        {
            if (isSpeaking)
            {
                if (eventInstance.isValid())
                {
                    eventInstance.stop(stopMode);

                    if (coroutineRunning)
                    {
                        StopAllCoroutines();
                        coroutineRunning = false;
                    }
                }
                else if (coroutineRunning)
                {
                    StopAllCoroutines();
                    coroutineRunning = false;
                    isSpeaking       = false;
                    string latestDialogue = currentDialogue;
                    currentDialogue = null;

                    if (voiceoverManager != null)
                    {
                        voiceoverManager.ReportSpeakerAvailability(speaker, latestDialogue);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public void StopAll(FMOD.Studio.STOP_MODE stopMode)
 {
     foreach (var instance in instances)
     {
         instance.stop(stopMode);
         instance.release();
     }
     instances.Clear();
 }
Ejemplo n.º 4
0
 public void StopSfxEffect(FMOD.Studio.STOP_MODE stopMode = FMOD.Studio.STOP_MODE.IMMEDIATE)
 {
     curFmodEffect.stop(stopMode);
     curFmodEffect.release();
     if (restoreMusicVolume == true)
     {
         restoreMusicVolume = false;
         curFmodMusic.setVolume(1f);
     }
 }
Ejemplo n.º 5
0
 public void TryStopLoop(EventType soundType, FMOD.Studio.STOP_MODE stopMode = FMOD.Studio.STOP_MODE.ALLOWFADEOUT)
 {
     try
     {
         FMOD.Studio.EventInstance eventInstance = dictionary[soundType].eventQueue.Dequeue();
         eventInstance.stop(stopMode);
     }
     catch
     {
     }
 }
Ejemplo n.º 6
0
    //Para a instância no índice de array dado, e escolhe modo de parada
    public void StopInstance(int index, bool isFadeOut)
    {
        FMOD.Studio.STOP_MODE stopMode = FMOD.Studio.STOP_MODE.IMMEDIATE;

        if (isFadeOut)
        {
            stopMode = FMOD.Studio.STOP_MODE.ALLOWFADEOUT;
        }

        instancesList[index].stop(stopMode);
        instancesList.RemoveAt(index);
    }
        private void StopAmbience(FMOD.Studio.STOP_MODE stopMode)
        {
            if (!ambienceStarted)
            {
                return;
            }

            if (baseAmbienceInstance.isValid())
            {
                baseAmbienceInstance.stop(stopMode);
                baseAmbienceInstance.release();
            }

            foreach (var spotAmbience in enteredSpotAmbienceAreas)
            {
                if (spotAmbience != null)
                {
                    spotAmbience.StopSpotAmbience();
                }
            }

            ambienceStarted = false;
        }
Ejemplo n.º 8
0
 public void Stop(FMOD.Studio.STOP_MODE mode = FMOD.Studio.STOP_MODE.IMMEDIATE)
 {
     instance.stop(mode);
     instance.setPaused(false);
 }
Ejemplo n.º 9
0
 public void StopSound(SoundTypes sound, FMOD.Studio.STOP_MODE stopMode)
 {
     sounds[sound].stop(stopMode);
 }