示例#1
0
 public static void SpawnCheck(Player Player)
 {
     if (!Player.CanFade || !Fade.Enabled) { return; }
     int Position = Player.Position;
     int Length = Player.Length;
     if (!Player.FinalFading && Position >= Length - FinalFade.DefaultEndLength && Length > FinalFade.DefaultEndLength * 4)
     {
         Player.SetFinalFade(Player, FinalFade.DefaultEndLength, FadeType.End);
     }
 }
示例#2
0
 public FinalFade(Player Player, int Length, FadeType Type)
     : base(Player, 0, Length, Type)
 {
     if (!Player.CanFade) { return; }
     if (Player.Paused) { this.Finish(); }
     Player.FadeStarted(Player, new EventArgs());
 }
示例#3
0
 public Fade(Player Player, int TargetVolume, int Length, FadeType Type)
 {
     if (!Player.CanFade) { return; }
     if (Type == FadeType.VolumeChange && Player._Fade != null && Player._Fade.Type != FadeType.VolumeChange)
     {
         return;
     }
     this._Player = Player;
     int Position = Player.Position;
     this._StartPosition = Position;
     this._EndPosition = Position + (int)Length;
     this._StartVolume = Player.RealVolume;
     this._EndVolume = TargetVolume;
     this._Type = Type;
     Player._Fade = this;
     if (!Fade.Enabled) { this.Finish(); }
 }
示例#4
0
 protected void SetFinalFade(Player Player, int Length, FadeType Type)
 {
     new FinalFade(Player, Length, Type);
 }
示例#5
0
 protected void SetFade(Player Player, int TargetVolume, int Length, FadeType FadeType)
 {
     new Fade(Player, TargetVolume, Length, FadeType);
 }
示例#6
0
 void Track_PlayStopped(object sender, Player.StopEventArgs e)
 {
     switch (e.Reason)
     {
         case StopReason.Finished: this._Result = TrackResult.Success; break;
         case StopReason.Aborted: this._Result = TrackResult.Aborted; break;
         default: this._Result = TrackResult.Error; break;
     }
     this.StateChanged(this, new EventArgs());
 }
示例#7
0
 void Track_PlayPaused(object sender, Player.PauseEventArgs e)
 {
     this.StateChanged(this, new EventArgs());
 }