Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
 public void FadeOut(TimeSpan duration) => CurrentMusic?.FadeOut(duration);