Fix potential race incorrectly pausing the source clock

This commit is contained in:
smoogipoo 2021-06-04 21:58:07 +09:00
parent 57a38374db
commit 009aa994d0

View File

@ -100,7 +100,13 @@ namespace osu.Game.Screens.Play
{
// The source is stopped by a frequency fade first.
if (isPaused.NewValue)
this.TransformBindableTo(pauseFreqAdjust, 0, 200, Easing.Out).OnComplete(_ => AdjustableSource.Stop());
{
this.TransformBindableTo(pauseFreqAdjust, 0, 200, Easing.Out).OnComplete(_ =>
{
if (IsPaused.Value == isPaused.NewValue)
AdjustableSource.Stop();
});
}
else
this.TransformBindableTo(pauseFreqAdjust, 1, 200, Easing.In);
}