Avoid setting the source clock until gameplay is ready to start

Without this change, the audio track may audibly seek during load
proceedings.
This commit is contained in:
Dean Herbert
2022-08-23 18:32:56 +09:00
parent ec61a94dc9
commit 29fed0c4a3
3 changed files with 4 additions and 5 deletions

View File

@ -70,14 +70,13 @@ namespace osu.Game.Beatmaps
set => decoupledClock.IsCoupled = value;
}
public FramedBeatmapClock(IClock? sourceClock = null, bool applyOffsets = false)
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.ChangeSource(sourceClock);
if (applyOffsets)
{