Merge pull request #11533 from Sam-Belliveau/smoother-vi-skip

Set VI Skip Activation to Half The Audio Buffer
This commit is contained in:
JMC47 2023-02-03 15:09:50 -05:00 committed by GitHub
commit aece99fe41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ void CoreTimingManager::Throttle(const s64 target_cycle)
// It doesn't matter what amount of lag we skip VI at, as long as it's constant. // It doesn't matter what amount of lag we skip VI at, as long as it's constant.
const DT max_variance = const DT max_variance =
std::chrono::duration_cast<DT>(DT_ms(Config::Get(Config::MAIN_TIMING_VARIANCE))); std::chrono::duration_cast<DT>(DT_ms(Config::Get(Config::MAIN_TIMING_VARIANCE)));
const TimePoint vi_deadline = time - max_variance; const TimePoint vi_deadline = time - std::min(max_fallback, max_variance) / 2;
m_throttle_disable_vi_int = 0.0 < speed && m_throttle_deadline < vi_deadline; m_throttle_disable_vi_int = 0.0 < speed && m_throttle_deadline < vi_deadline;
// Only sleep if we are behind the deadline // Only sleep if we are behind the deadline