예제 #1
0
        void PlayCue(ref Cue cue)
        {
            if (cue.IsStopped || cue.IsStopping)
            {
                string name = cue.Name;

                cue.Dispose();
                cue = _soundBank.GetCue(name);
            }

            if (!cue.IsPlaying)
                cue.Play();
        }
예제 #2
0
 private void PlaySoundMainSE(string se)
 {
     engineSound2 = soundBank2.GetCue(se);
     SetVolumeMainSE();
     audioEngine.Update();
     engineSound2.Play();
     if (engineSound2.IsStopped == true)
     { engineSound2.Dispose(); }
     else if (engineSound2.IsStopping == true)
     { engineSound2.Dispose(); }
 }
예제 #3
0
 private void StopSoundMainSE(string se)
 {
     if (engineSound2 != null)
     {
         engineSound2 = soundBank2.GetCue(se);
         engineSound2.Stop(AudioStopOptions.AsAuthored);
         waveBank2.Dispose();
         soundBank2.Dispose();
         engineSound2.Dispose();
         audioEngine.Update();
         engineSound2 = null;
     }
 }
예제 #4
0
 private void CloseSoundMain()
 {
     if (engineSound != null)
     {
         engineSound = soundBank.GetCue(bgmname);
         engineSound.Stop(AudioStopOptions.AsAuthored);
         waveBank.Dispose();
         soundBank.Dispose();
         engineSound.Dispose();
         audioEngine.Update();
     }
 }