diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-12 19:03:02 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-12 17:08:59 +0000 |
commit | 9ef1c02adea70a46c91503e2c0c960262280ba24 (patch) | |
tree | 239eeed9787809b35f5ea3b2abe2daac2cd25d2b /logic | |
parent | 4ae9126f2c7d34631ee7e77f64fa161dab76e8d2 (diff) |
tracker/pipeline: try help frame variance
While we're keeping 250 Hz in the tracker pipeline, the
frame variance isn't optimal, as per `backlog_time'
values. Try a different magic number.
Diffstat (limited to 'logic')
-rw-r--r-- | logic/pipeline.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index 6a01b272..021a576b 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -588,8 +588,10 @@ void pipeline::run() backlog_time += ns{elapsed_nsecs - const_sleep_ms}; - const int sleep_time_ms = ms{clamp(const_sleep_ms - backlog_time, - ms{}, ms{10})}.count() + .1f; + const int sleep_time_ms = (int)( + clamp(ms{const_sleep_ms - backlog_time}, + ms{0}, ms{10}).count() - .45f + ); #ifdef DEBUG_TIMINGS { |