diff --git a/osu-framework b/osu-framework index db625dc65f..5e26808ec7 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit db625dc65fb7ae9be154b03a0968b2f8cedb036d +Subproject commit 5e26808ec77a8fd600cb1cdca3a4b2f62fd0c653 diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 3775b9c933..fe26e4a1d1 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -17,6 +17,8 @@ using osu.Game.Rulesets.UI; using osu.Game.Screens.Backgrounds; using System; using System.Linq; +using System.Threading; +using System.Threading.Tasks; using osu.Framework.Threading; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Scoring; @@ -142,14 +144,21 @@ namespace osu.Game.Screens.Play userAudioOffset.ValueChanged += v => offsetClock.Offset = v; userAudioOffset.TriggerChange(); - Schedule(() => + Task.Run(() => { adjustableSourceClock.Reset(); - foreach (var mod in working.Mods.Value.OfType()) - mod.ApplyToClock(adjustableSourceClock); + // this is temporary until we have blocking (async.Wait()) audio component methods. + // then we can call ResetAsync().Wait() or the blocking version above. + while (adjustableSourceClock.IsRunning) + Thread.Sleep(1); - decoupledClock.ChangeSource(adjustableSourceClock); + Schedule(() => + { + decoupledClock.ChangeSource(adjustableSourceClock); + foreach (var mod in working.Mods.Value.OfType()) + mod.ApplyToClock(adjustableSourceClock); + }); }); Children = new Drawable[]