Example #1
0
        private void ResetTimerInterval()
        {
            if (_playTimer == null)
            {
                return;
            }
            double dInv = 1 / ConstVars.GetDoubleSpeed(PlaySpeed);

            _playTimer.Interval = (int)(dInv * 1000);
        }
Example #2
0
        public void SetSpeed(int iSpeed)
        {
            InitVlcPlayer();
            PlaySpeed = iSpeed;
            double dRate = ConstVars.GetDoubleSpeed(PlaySpeed);

            _mVlc.SetRate(dRate);
            ResetTimerInterval();
            UpdateSpeed();
        }
Example #3
0
        public void UpdateSpeed()
        {
            if (_lbSpeed == null)
            {
                return;
            }

            InitVlcPlayer();
            double dRate = ConstVars.GetDoubleSpeed(PlaySpeed);

            _lbSpeed.Visible = true;
            _lbSpeed.Text    = string.Format("{0:N1}x", dRate);
        }
Example #4
0
        private void updatePlayStatus_Start()
        {
            InitVlcPlayer();
            _mVlc.Play();
            _mVlc.SetRate(ConstVars.GetDoubleSpeed(PlaySpeed));
            _mVlc.SetVolume(Valume);

            double dDuration = _mVlc.Duration();

            if (_tbProcess != null)
            {
                _tbProcess.SetRange(0, (int)dDuration);
                _tbProcess.Value = 0;
            }
            if (_playTimer != null)
            {
                _playTimer.Start();
            }
            UpdateTexts();
        }