Exemple #1
0
 public void PlayCrossFade(string musicName, TimeSpan duration, bool loopTrack = true)
 {
     if (!IsPlaying)
     {
         Play(musicName, loopTrack);
     }
     else
     {
         CurrentMusic.FadeOut(duration);
         CurrentMusicName = musicName;
         CurrentMusic.Stop();
         CurrentMusic.PlayFadeIn(Volume, duration, loopTrack);
     }
 }
Exemple #2
0
 public void FadeOut(TimeSpan duration) => CurrentMusic?.FadeOut(duration);