Esempio n. 1
0
        public virtual void Update()
        {
            if (!_Initialized)
            {
                return;
            }

            if (_actsong != _PreviewSelected)
            {
                SelectSong(_PreviewSelected);
            }

            if (_streams.Count > 0 && _video != -1)
            {
                if (CVideo.VdFinished(_video) || CSound.IsFinished(_actsongstream))
                {
                    CVideo.VdClose(_video);
                    _video = -1;
                    return;
                }

                float time = CSound.GetPosition(_actsongstream);

                float vtime = 0f;
                CVideo.VdGetFrame(_video, ref _vidtex, time, ref vtime);
                if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
                {
                    _vidtex.color.A = (_VideoFadeTimer.ElapsedMilliseconds / 3000f);
                }
                else
                {
                    _vidtex.color.A = 1f;
                    _VideoFadeTimer.Stop();
                }
            }
        }