Improved time management for software framerate limiter.

This commit is contained in:
brunoherbelin
2021-01-27 09:35:46 +01:00
parent 29c40036b2
commit 9b795a0df7
2 changed files with 9 additions and 4 deletions

View File

@@ -188,7 +188,7 @@ void Mixer::update()
update_time_ = gst_util_get_timestamp ();
guint64 current_time = gst_util_get_timestamp ();
// dt is in milisecond, with fractional precision (from micro seconds)
dt_ = static_cast<float>( GST_TIME_AS_USECONDS(current_time - update_time_) * 0.001f);
dt_ = static_cast<float>( GST_TIME_AS_USECONDS(current_time - update_time_) ) * 0.001f;
update_time_ = current_time;
// update session and associated sources