diff options
author | Billy Laws <blaws05@gmail.com> | 2023-04-02 18:29:07 +0200 |
---|---|---|
committer | Billy Laws <blaws05@gmail.com> | 2023-04-04 00:11:36 +0200 |
commit | 0afb9631b53de1a747fc9ba46ed37781b04ef492 (patch) | |
tree | a6ec92c10363f3fe6869c3f3d44e5396f5670622 /src/audio_core/sink | |
parent | Merge pull request #10024 from german77/crysis (diff) | |
download | yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.tar yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.tar.gz yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.tar.bz2 yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.tar.lz yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.tar.xz yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.tar.zst yuzu-0afb9631b53de1a747fc9ba46ed37781b04ef492.zip |
Diffstat (limited to 'src/audio_core/sink')
-rw-r--r-- | src/audio_core/sink/sink_stream.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp index f99dbd8ec..13c73b5d7 100644 --- a/src/audio_core/sink/sink_stream.cpp +++ b/src/audio_core/sink/sink_stream.cpp @@ -266,7 +266,8 @@ u64 SinkStream::GetExpectedPlayedSampleCount() { auto exp_played_sample_count{min_played_sample_count + (TargetSampleRate * time_delta) / std::chrono::seconds{1}}; - return std::min<u64>(exp_played_sample_count, max_played_sample_count); + // Add 15ms of latency in sample reporting to allow for some leeway in scheduler timings + return std::min<u64>(exp_played_sample_count, max_played_sample_count) + TargetSampleCount * 3; } void SinkStream::WaitFreeSpace() { |