1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 04:59:53 +08:00

Merge branch 'master' into multiplier1x

This commit is contained in:
CaffeeLake
2024-01-04 05:04:23 +09:00
committed by GitHub
Unverified
2 changed files with 15 additions and 0 deletions
@@ -21,6 +21,7 @@ using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Taiko;
using osu.Game.Scoring;
using osu.Game.Screens.Play;
using osu.Game.Screens.Ranking;
using osu.Game.Tests.Beatmaps;
@@ -359,6 +360,11 @@ namespace osu.Game.Tests.Visual.Gameplay
AllowImportCompletion = new SemaphoreSlim(1);
}
protected override GameplayClockContainer CreateGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStart) => new MasterGameplayClockContainer(beatmap, gameplayStart)
{
ShouldValidatePlaybackRate = false,
};
protected override async Task ImportScore(Score score)
{
ScoreImportStarted = true;
@@ -40,6 +40,12 @@ namespace osu.Game.Screens.Play
Precision = 0.1,
};
/// <summary>
/// Whether the audio playback rate should be validated.
/// Mostly disabled for tests.
/// </summary>
internal bool ShouldValidatePlaybackRate { get; init; } = true;
/// <summary>
/// Whether the audio playback is within acceptable ranges.
/// Will become false if audio playback is not going as expected.
@@ -223,6 +229,9 @@ namespace osu.Game.Screens.Play
private void checkPlaybackValidity()
{
if (!ShouldValidatePlaybackRate)
return;
if (GameplayClock.IsRunning)
{
elapsedGameplayClockTime += GameplayClock.ElapsedFrameTime;