Example #1
0
        }     //-1

        /// <summary>
        /// function to stop Fast Forward / Rewind and also stop preview timer
        /// </summary>
        private void StopForwardRewind()
        {
            if (mPlaybackMode != PlaybackModes.Normal || mPreviewTimer.Enabled == true)
            {
                mPreviewTimer.Enabled = false;
                mFwdRwdRate           = 1;
                m_lChunkStartPosition = 0;
                mPlaybackMode         = PlaybackModes.Normal;
                mEnableEvents         = true;
            }
        }
Example #2
0
        private void SetPlaybackMode(PlaybackModes l_PlaybackMode)
        {
            if (mState == PlayerState.Playing || mPlaybackMode != PlaybackModes.Normal)
            {
                long RestartPos = 0;
                RestartPos = CurrentBytePosition;

                StopFunction();
                mState        = PlayerState.NotReady;
                mPlaybackMode = l_PlaybackMode;
                InitPlay(RestartPos, 0);
            }
            else if (mState == PlayerState.Paused || mState == PlayerState.Stopped)
            {
                mPlaybackMode = l_PlaybackMode;
            }
        }
Example #3
0
        /// <summary>
        /// Create a new audio player
        /// </summary>
        public Player()
        {
            mCurrentAudioMediaData = null;
            mDevice                   = null;
            mEnableEvents             = true;
            mFastPlayFactor           = 1.0f;
            mFwdRwdRate               = 1;
            mMonitoringTimer          = new System.Windows.Forms.Timer();
            mMonitoringTimer.Tick    += new System.EventHandler(this.MonitoringTimer_Tick);
            mMonitoringTimer.Interval = MONITORING_TIMER_INTERVAL;
            mPlaybackMode             = PlaybackModes.Normal;
            mPreviewTimer             = new System.Windows.Forms.Timer();
            mPreviewTimer.Tick       += new System.EventHandler(this.mPreviewTimer_Tick);
            mPreviewTimer.Interval    = PREVIEW_TIMER_INTERVAL;
            mState = PlayerState.NotReady;

            mPausePosition = 0;
            mStartPosition = 0;
        }
Example #4
0
 public void SetPlaybackMode(PlaybackModes mode)
 {
     VlcContext.InteropManager.MediaListPlayerInterops.SetPlaybackMode.Invoke(VlcContext.HandleManager.MediasListPlayerHandles[this], mode);
 }