From e48b9011bf43d789c92803260a609a6063647032 Mon Sep 17 00:00:00 2001 From: Tatsuya79 Date: Thu, 9 Aug 2018 12:29:40 +0200 Subject: [PATCH] Don't adjust audio for VRR. Silence log message about it. --- audio/audio_driver.c | 2 +- gfx/video_driver.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index e35fbd7951..b7eb32aa69 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -888,7 +888,7 @@ void audio_driver_monitor_adjust_system_rates(void) timing_skew = fabs(1.0f - info->fps / video_refresh_rate); audio_driver_input = info->sample_rate; - if (timing_skew <= max_timing_skew) + if (timing_skew <= max_timing_skew && !settings->bools.vrr_runloop_enable) audio_driver_input *= (video_refresh_rate / info->fps); RARCH_LOG("[Audio]: Set audio input rate to: %.2f Hz.\n", diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 30e7f4d4b4..3a38c46eed 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1456,15 +1456,18 @@ void video_driver_monitor_adjust_system_rates(void) timing_skew = fabs( 1.0f - info->fps / timing_skew_hz); - /* We don't want to adjust pitch too much. If we have extreme cases, - * just don't readjust at all. */ - if (timing_skew <= settings->floats.audio_max_timing_skew) - return; + if (!settings->bools.vrr_runloop_enable) + { + /* We don't want to adjust pitch too much. If we have extreme cases, + * just don't readjust at all. */ + if (timing_skew <= settings->floats.audio_max_timing_skew) + return; - RARCH_LOG("[Video]: Timings deviate too much. Will not adjust." - " (Display = %.2f Hz, Game = %.2f Hz)\n", - video_refresh_rate, - (float)info->fps); + RARCH_LOG("[Video]: Timings deviate too much. Will not adjust." + " (Display = %.2f Hz, Game = %.2f Hz)\n", + video_refresh_rate, + (float)info->fps); + } if (info->fps <= timing_skew_hz) return;