mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Fix audio not playing during player loading
Regression due to changed audio initialisation logic.
This commit is contained in:
parent
c52da05b42
commit
a2cb9d4086
@ -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,11 +313,27 @@ namespace osu.Game.Screens.Play
|
|||||||
.Delay(250)
|
.Delay(250)
|
||||||
.FadeIn(250);
|
.FadeIn(250);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
this.Delay(750).Schedule(() =>
|
this.Delay(750).Schedule(() =>
|
||||||
{
|
{
|
||||||
if (!pauseContainer.IsPaused)
|
if (!pauseContainer.IsPaused)
|
||||||
decoupledClock.Start();
|
decoupledClock.Start();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
pauseContainer.Alpha = 0;
|
pauseContainer.Alpha = 0;
|
||||||
pauseContainer.FadeIn(750, Easing.OutQuint);
|
pauseContainer.FadeIn(750, Easing.OutQuint);
|
||||||
|
Loading…
Reference in New Issue
Block a user