Skip to content

Commit

Permalink
Traktor: Restored filtering of delta time.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed Jan 15, 2024
1 parent 1ff9a79 commit 94c58a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/Runtime/Impl/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,9 @@ bool Application::update()
inputEnabled &= !m_onlineServer->getSessionManager()->requireUserAttention();

// Measure delta time.
m_updateInfo.m_frameDeltaTime = m_timer.getDeltaTime();
const double deltaTime = m_timer.getDeltaTime();
const double deltaTimeDiff = clamp(deltaTime - m_updateInfo.m_frameDeltaTime, -0.01, 0.01);
m_updateInfo.m_frameDeltaTime = lerp(m_updateInfo.m_frameDeltaTime, m_updateInfo.m_frameDeltaTime + deltaTimeDiff, 0.01);

// Update audio.
if (m_audioServer)
Expand Down

0 comments on commit 94c58a5

Please sign in to comment.