mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Change userBeatmapOffsetClock
to a FramedOffsetClock
Assuming that the global audio offset is set perfectly, such that any audio latency is fully accounted for, if a specific beatmap still sounds out of sync, that would no longer be a latency issue. Instead, it would indicate a misalignment between the beatmap's track and time codes, the correction for which should be a virtual-time offset, not a real-time offset.
This commit is contained in:
parent
c87bc8b597
commit
012d6b7fe1
@ -29,7 +29,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
private readonly OffsetCorrectionClock? userGlobalOffsetClock;
|
||||
private readonly OffsetCorrectionClock? platformOffsetClock;
|
||||
private readonly OffsetCorrectionClock? userBeatmapOffsetClock;
|
||||
private readonly FramedOffsetClock? userBeatmapOffsetClock;
|
||||
|
||||
private readonly IFrameBasedClock finalClockSource;
|
||||
|
||||
@ -70,7 +70,7 @@ namespace osu.Game.Beatmaps
|
||||
userGlobalOffsetClock = new OffsetCorrectionClock(platformOffsetClock);
|
||||
|
||||
// User per-beatmap offset will be applied to this final clock.
|
||||
finalClockSource = userBeatmapOffsetClock = new OffsetCorrectionClock(userGlobalOffsetClock);
|
||||
finalClockSource = userBeatmapOffsetClock = new FramedOffsetClock(userGlobalOffsetClock);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -122,7 +122,7 @@ namespace osu.Game.Beatmaps
|
||||
Debug.Assert(userBeatmapOffsetClock != null);
|
||||
Debug.Assert(platformOffsetClock != null);
|
||||
|
||||
return userGlobalOffsetClock.RateAdjustedOffset + userBeatmapOffsetClock.RateAdjustedOffset + platformOffsetClock.RateAdjustedOffset;
|
||||
return userGlobalOffsetClock.RateAdjustedOffset + userBeatmapOffsetClock.Offset + platformOffsetClock.RateAdjustedOffset;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user