Merge branch 'fix-pre-seek-sample-lifetime' into gcc-abstraction

This commit is contained in:
smoogipoo
2021-04-20 17:27:01 +09:00
46 changed files with 1029 additions and 184 deletions

View File

@ -77,7 +77,33 @@ namespace osu.Game.Tests.Gameplay
AddStep("start time", () => gameplayContainer.Start());
AddUntilStep("sample playback succeeded", () => sample.LifetimeEnd < double.MaxValue);
AddUntilStep("sample played", () => sample.RequestedPlaying);
AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
}
[Test]
public void TestSampleHasLifetimeEndWithInitialClockTime()
{
GameplayClockContainer gameplayContainer = null;
DrawableStoryboardSample sample = null;
AddStep("create container", () =>
{
var working = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
working.LoadTrack();
Add(gameplayContainer = new GameplayClockContainer(working, 1000, true));
gameplayContainer.Add(sample = new DrawableStoryboardSample(new StoryboardSampleInfo(string.Empty, 0, 1))
{
Clock = gameplayContainer.GameplayClock
});
});
AddStep("start time", () => gameplayContainer.Start());
AddUntilStep("sample not played", () => !sample.RequestedPlaying);
AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
}
[TestCase(typeof(OsuModDoubleTime), 1.5)]