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

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

            _mVlc.SetRate(dRate);
            ResetTimerInterval();
            UpdateSpeed();
        }
Esempio n. 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);
        }
Esempio n. 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();
        }