1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Change FramedBeatmapClock to always be decoupled

This commit is contained in:
Dean Herbert 2023-09-21 15:23:22 +09:00
parent d18bd2d2ac
commit 600651795b
3 changed files with 5 additions and 9 deletions

View File

@ -13,6 +13,8 @@ using osu.Game.Configuration;
using osu.Game.Database;
using osu.Game.Screens.Play;
#pragma warning disable CS0618
namespace osu.Game.Beatmaps
{
/// <summary>
@ -66,19 +68,13 @@ namespace osu.Game.Beatmaps
public bool IsRewinding { get; private set; }
public bool IsCoupled
{
get => decoupledClock.IsCoupled;
set => decoupledClock.IsCoupled = value;
}
public FramedBeatmapClock(bool applyOffsets = false)
{
this.applyOffsets = applyOffsets;
// A decoupled clock is used to ensure precise time values even when the host audio subsystem is not reporting
// high precision times (on windows there's generally only 5-10ms reporting intervals, as an example).
decoupledClock = new DecoupleableInterpolatingFramedClock { IsCoupled = true };
decoupledClock = new DecoupleableInterpolatingFramedClock { IsCoupled = false };
if (applyOffsets)
{

View File

@ -54,7 +54,7 @@ namespace osu.Game.Screens.Edit
this.beatDivisor = beatDivisor ?? new BindableBeatDivisor();
underlyingClock = new FramedBeatmapClock(applyOffsets: true) { IsCoupled = false };
underlyingClock = new FramedBeatmapClock(applyOffsets: true);
AddInternal(underlyingClock);
}

View File

@ -68,7 +68,7 @@ namespace osu.Game.Screens.Play
InternalChildren = new Drawable[]
{
GameplayClock = new FramedBeatmapClock(applyOffsets) { IsCoupled = false },
GameplayClock = new FramedBeatmapClock(applyOffsets),
Content
};
}