mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Merge branch 'master' into menu-select-transition-improvements
This commit is contained in:
commit
89fd92c15b
@ -1 +1 @@
|
||||
Subproject commit db625dc65fb7ae9be154b03a0968b2f8cedb036d
|
||||
Subproject commit 5e26808ec77a8fd600cb1cdca3a4b2f62fd0c653
|
@ -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<IApplicableToClock>())
|
||||
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<IApplicableToClock>())
|
||||
mod.ApplyToClock(adjustableSourceClock);
|
||||
});
|
||||
});
|
||||
|
||||
Children = new Drawable[]
|
||||
|
Loading…
Reference in New Issue
Block a user