/// <summary>
        /// Seek to a specific time in gameplay.
        /// <remarks>
        /// Adjusts for any offsets which have been applied (so the seek may not be the expected point in time on the underlying audio track).
        /// </remarks>
        /// </summary>
        /// <param name="time">The destination time to seek to.</param>
        public void Seek(double time)
        {
            // remove the offset component here because most of the time we want the seek to be aligned to gameplay, not the audio track.
            // we may want to consider reversing the application of offsets in the future as it may feel more correct.
            adjustableClock.Seek(time - totalOffset);

            // manually process frame to ensure GameplayClock is correctly updated after a seek.
            userOffsetClock.ProcessFrame();
        }
        protected override void Update()
        {
            if (!IsPaused.Value)
            {
                offsetClock.ProcessFrame();
            }

            base.Update();
        }
Beispiel #3
0
 public void Seek(double time)
 {
     decoupleableClock.Seek(time - totalOffset);
     userOffsetClock.ProcessFrame();
 }
Beispiel #4
0
 protected override void Update()
 {
     base.Update();
     localClock.ProcessFrame();
 }