1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 23:12:59 +08:00

Merge branch 'master' into fix-replay-clock

This commit is contained in:
Dean Herbert 2017-11-13 20:15:37 +09:00 committed by GitHub
commit 1a8864fa00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,22 +144,6 @@ namespace osu.Game.Screens.Play
userAudioOffset.ValueChanged += v => offsetClock.Offset = v; userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
userAudioOffset.TriggerChange(); userAudioOffset.TriggerChange();
Task.Run(() =>
{
adjustableSourceClock.Reset();
// 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);
Schedule(() =>
{
decoupledClock.ChangeSource(adjustableSourceClock);
applyRateFromMods();
});
});
Children = new Drawable[] Children = new Drawable[]
{ {
storyboardContainer = new Container storyboardContainer = new Container
@ -329,10 +313,26 @@ namespace osu.Game.Screens.Play
.Delay(250) .Delay(250)
.FadeIn(250); .FadeIn(250);
this.Delay(750).Schedule(() => Task.Run(() =>
{ {
if (!pauseContainer.IsPaused) adjustableSourceClock.Reset();
decoupledClock.Start();
// 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);
Schedule(() =>
{
decoupledClock.ChangeSource(adjustableSourceClock);
applyRateFromMods();
this.Delay(750).Schedule(() =>
{
if (!pauseContainer.IsPaused)
decoupledClock.Start();
});
});
}); });
pauseContainer.Alpha = 0; pauseContainer.Alpha = 0;