/// <summary>
 ///     Handles the OnEndFadeIn event of the BassPlayer control.
 /// </summary>
 private void BassPlayer_OnFadeEnded(object sender, EventArgs e)
 {
     if (PlaylistControl.InvokeRequired)
     {
         PlaylistControl.BeginInvoke(new MethodInvoker(delegate { BassPlayer_OnFadeEnded(); }));
     }
     else
     {
         BassPlayer_OnFadeEnded();
     }
 }
        /// <summary>
        ///     Handles the OnEndFadeIn event of the BassPlayer control.
        /// </summary>
        private void BassPlayer_OnFadeEnded()
        {
            if (!AutoGenerateEnabled)
            {
                return;
            }
            var tracksRemaining = PlaylistControl.GetNumberOfTracksRemaining();

            if (tracksRemaining < TracksRemainingThreshold)
            {
                AutoGeneratePlaylist();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Gets the previous track.
        /// </summary>
        /// <returns>The previous track</returns>
        private Track GetPreviousTrack()
        {
            var prevTrack = PlaylistControl.GetPreviousTrack();

            if (prevTrack == null)
            {
                return(null);
            }

            var track = BassPlayer.LoadTrack(prevTrack.Filename);

            BassPlayer.LoadTrackAudioData(track);
            ExtenedAttributesHelper.LoadExtendedAttributes(track);
            return(track);
        }
Ejemplo n.º 4
0
        public void SetCurrentMixRank(int mixRank)
        {
            if (BassPlayer.CurrentTrack == null)
            {
                return;
            }

            Track currentTrack = null;

            if (BassPlayer.CurrentTrack != null)
            {
                currentTrack = Library.GetTrackByFilename(BassPlayer.CurrentTrack.Filename);
            }

            var prevTrack = PlaylistControl.GetPreviousTrack();

            if (prevTrack == null)
            {
                return;
            }

            MixLibrary.SetMixLevel(prevTrack, currentTrack, mixRank);
        }
Ejemplo n.º 5
0
        public int GetCurrentMixRank()
        {
            if (BassPlayer.CurrentTrack == null)
            {
                return(1);
            }

            Track currentTrack = null;

            if (BassPlayer.CurrentTrack != null)
            {
                currentTrack = Library.GetTrackByFilename(BassPlayer.CurrentTrack.Filename);
            }

            var prevTrack = PlaylistControl.GetPreviousTrack();

            if (prevTrack == null)
            {
                return(1);
            }

            return(MixLibrary.GetMixLevel(prevTrack, currentTrack));
        }
Ejemplo n.º 6
0
 private void btnReplayMix_Click(object sender, EventArgs e)
 {
     BeginInvoke(new MethodInvoker(delegate { PlaylistControl.ReplayMix(); }));
 }
Ejemplo n.º 7
0
 /// <summary>
 ///     Handles the Click event of the btnPrevious control.
 /// </summary>
 private void btnPrevious_Click(object sender, EventArgs e)
 {
     BeginInvoke(new MethodInvoker(delegate { PlaylistControl.PlayPreviousTrack(); }));
 }