Example #1
0
        /// <summary>
        /// Button play clicked: manage actions according to player status
        /// </summary>
        private void PlayPauseMusic()
        {
            switch (PlayerState)
            {
            case PlayerStates.Playing:
                // If playing => pause
                PlayerState = PlayerStates.Paused;
                BtnStatus();
                break;

            case PlayerStates.Paused:
                // if paused => play
                nbstop      = 0;
                PlayerState = PlayerStates.Playing;
                BtnStatus();
                timer1.Start();
                sequencer1.Continue();
                break;

            default:
                // First play
                FirstPlaySong(newstart);
                break;
            }
        }
Example #2
0
 public void UpdateMutedTracks(TrackItem item)
 {
     if (isPlaying)
     {
         sequencer.Stop();
     }
     sequence.UpdateMutedTracks(item.Id, item.Active);
     if (isPlaying)
     {
         sequencer.Continue();
     }
     outDevice.Reset();
 }
Example #3
0
 public void play()
 {
     if (!_running && _sequencer.Sequence != null)
     {
         _running = true;
         _sequencer.Continue();
     }
 }
Example #4
0
 public void Play()
 {
     if (_running)
     {
         return;
     }
     _running = true;
     _sequencer.Continue();
     UpdateButtons();
 }
Example #5
0
        public void Track_Selection(Nez.UI.Button btn)
        {
            //
            // Track selection check mark (on top of slider)
            // Mute also comes here for each track
            //
            if (TrackChanl[btn.Tag] < 0)
            {
                return;
            }


            TracksPlaying[btn.Tag] = !TracksPlaying[btn.Tag];
            ChannelsPlaying[TrackChanl[btn.Tag]] = !ChannelsPlaying[TrackChanl[btn.Tag]];

            AllChannels = 0;
            sequencer1.Stop();
            sequencer1.Continue();
        }
Example #6
0
 static void Start(float time)
 {
     if (lastBeatStarts[0] > 0)
     {
         for (int i = 0; i < lastBeatStarts.Length; ++i)
         {
             lastBeatStarts[i] += Time - lastBeatStarts[lastBeatStarts.Length - 1];
         }
     }
     sequencer.Continue();
 }
 private void btnContinue_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         playing = true;
         sequencer1.Continue();
         timer1.Start();
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
 }
 private void HandleOption_PauseContinue()
 {
     if (_sequencer.IsRunning)
     {
         _sequencer.Stop();
         Console.WriteLine("->pause");
     }
     else
     {
         _sequencer.Continue();
         Console.WriteLine("->continue");
     }
 }
Example #9
0
 private void Continue()
 {
     try
     {
         playing = true;
         sequencer1.Continue();
         timer1.Start();
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
     }
 }
Example #10
0
 internal static void Continue()
 {
     try
     {
         IsPlaying = true;
         sequencer.Continue();
         Timer.Start();
     }
     catch (Exception ex)
     {
         UiManager.ThrowError(ex.Message);
     }
 }
Example #11
0
 public void Pause()
 {
     if (IsPaused)
     {
         Sequencer.Continue();
         IsPaused = false;
         CanPause = true;
         CanPlay  = false;
     }
     else
     {
         Sequencer.Pause();
         IsPaused = true;
         CanPause = false;
         CanPlay  = true;
     }
 }
Example #12
0
        public void Start()
        {
            if (!Stopped)
            {
                return;
            }

            eventTimer.Start();
            if (sequencer.Position > 0)
            {
                sequencer.Continue();
            }
            else
            {
                sequencer.Start();
            }

            Stopwatch.Start();
            Stopped = false;
        }
Example #13
0
        public void Play()
        {
            if (IsRecording)
            {
                StopRecording();
            }

            if (IsPaused)
            {
                Sequencer.Continue();
            }
            else
            {
                Sequencer.Start();
            }

            IsPlaying = true;
            CanPlay   = false;
            CanPause  = true;
        }
Example #14
0
 public void Continue()
 {
     _sequencer.Continue();
 }
Example #15
0
 private void btnContinueMidi_Click(object sender, EventArgs e)
 {
     sequencer.Continue();
 }