Exemplo n.º 1
0
        /// <summary>
        /// Sets the speedrate of the audio being played
        /// </summary>
        private void trackBar_PlayBackRate_Scroll(object sender, EventArgs e)
        {
            if (_player.SetOutput)
            {
                _player.SetRate(SpeedRate.ConvertRate(trackBar_PlayBackRate.Value));
                Thread.Sleep(100);
                label_PlayBackRate.Text = SpeedRate.DisplayRate(_player.Rate.ToString());
            }
            else
            {
                label_PlayBackRate.Text = SpeedRate.DisplayRate(SpeedRate.ConvertRate(trackBar_PlayBackRate.Value).ToString());
            }

            enhanchedTextBox1.txtBox.Focus();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Used when on auto speed.
 /// </summary>
 private void CheckRateOK()
 {
     if (wordcount >= 10)
     {
         _player.SetRate(SpeedRate.ConvertRate(1));
         Thread.Sleep(100);
         label_PlayBackRate.Text     = SpeedRate.DisplayRate(_player.Rate.ToString());
         trackBar_PlayBackRate.Value = 1;
     }
     else if (wordcount <= 5)
     {
         _player.SetRate(SpeedRate.ConvertRate(-1));
         Thread.Sleep(100);
         label_PlayBackRate.Text     = SpeedRate.DisplayRate(_player.Rate.ToString());
         trackBar_PlayBackRate.Value = -1;
     }
 }