mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 10:22:56 +08:00
Change FramedBeatmapClock
to always be decoupled
This commit is contained in:
parent
d18bd2d2ac
commit
600651795b
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
GameplayClock = new FramedBeatmapClock(applyOffsets) { IsCoupled = false },
|
||||
GameplayClock = new FramedBeatmapClock(applyOffsets),
|
||||
Content
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user