mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +00:00
Disable decoupling for OsuGameBase
's beatmap implementation
This avoids it ever mutating the underlying track (aka attempting to start it). Resolves the one caveat mentioned in aeef92fa710648d4a00edc523e13c17ac6104125.
This commit is contained in:
parent
5f634f2812
commit
df08c4e1ad
@ -56,14 +56,14 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public bool IsRewinding { get; private set; }
|
||||
|
||||
public FramedBeatmapClock(bool applyOffsets = false)
|
||||
public FramedBeatmapClock(bool applyOffsets, bool requireDecoupling)
|
||||
{
|
||||
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).
|
||||
decoupledTrack = new DecouplingClock();
|
||||
decoupledTrack = new DecouplingClock { AllowDecoupling = requireDecoupling };
|
||||
|
||||
// An interpolating 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).
|
||||
var interpolatedTrack = new InterpolatingFramedClock(decoupledTrack);
|
||||
|
||||
if (applyOffsets)
|
||||
|
@ -215,7 +215,7 @@ namespace osu.Game
|
||||
/// For now, this is used as a source specifically for beat synced components.
|
||||
/// Going forward, it could potentially be used as the single source-of-truth for beatmap timing.
|
||||
/// </summary>
|
||||
private readonly FramedBeatmapClock beatmapClock = new FramedBeatmapClock(true);
|
||||
private readonly FramedBeatmapClock beatmapClock = new FramedBeatmapClock(applyOffsets: true, requireDecoupling: false);
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
this.beatDivisor = beatDivisor ?? new BindableBeatDivisor();
|
||||
|
||||
underlyingClock = new FramedBeatmapClock(applyOffsets: true);
|
||||
underlyingClock = new FramedBeatmapClock(applyOffsets: true, requireDecoupling: true);
|
||||
AddInternal(underlyingClock);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
GameplayClock = new FramedBeatmapClock(applyOffsets),
|
||||
GameplayClock = new FramedBeatmapClock(applyOffsets, requireDecoupling: true),
|
||||
Content
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user