improve toxav module

This commit is contained in:
2024-09-27 22:37:06 +02:00
parent 61b9044f94
commit 59cdb2638f
3 changed files with 282 additions and 1 deletions

View File

@ -518,6 +518,12 @@ Screen* MainScreen::tick(float time_delta, bool& quit) {
quit = !tc.iterate(time_delta); // compute
#if TOMATO_TOX_AV
tav.toxavIterate();
// HACK: pow by 1.18 to increase 200 -> ~500
const float av_interval = std::pow(tav.toxavIterationInterval(), 1.18)/1000.f;
#endif
tcm.iterate(time_delta); // compute
const float fo_interval = tffom.tick(time_delta);
@ -556,6 +562,13 @@ Screen* MainScreen::tick(float time_delta, bool& quit) {
fo_interval
);
#if TOMATO_TOX_AV
_min_tick_interval = std::min<float>(
_min_tick_interval,
av_interval
);
#endif
//std::cout << "MS: min tick interval: " << _min_tick_interval << "\n";
switch (_compute_perf_mode) {