Move FrameStablePlayback handling to early return

This commit is contained in:
Dean Herbert 2019-08-16 20:21:00 +09:00
parent 58d2268b9e
commit d11b896148
1 changed files with 9 additions and 2 deletions

View File

@ -118,7 +118,14 @@ private void updateClock()
try
{
if (firstConsumption)
if (!FrameStablePlayback)
{
manualClock.CurrentTime = newProposedTime;
requireMoreUpdateLoops = false;
return;
}
else if (firstConsumption)
{
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
// Instead we perform an initial seek to the proposed time.
@ -138,7 +145,7 @@ private void updateClock()
: Math.Max(newProposedTime, manualClock.CurrentTime - sixty_frame_time);
}
if (!isAttached || !FrameStablePlayback)
if (!isAttached)
{
manualClock.CurrentTime = newProposedTime;
}