mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Fix adjustments not being removed correctly on retry from pause
This commit is contained in:
parent
1f40641d05
commit
cd1dd0f898
@ -162,16 +162,12 @@ namespace osu.Game.Screens.Play
|
||||
if (sourceClock != beatmap.Track)
|
||||
return;
|
||||
|
||||
removeSourceClockAdjustments();
|
||||
|
||||
sourceClock = new TrackVirtual(beatmap.Track.Length);
|
||||
adjustableClock.ChangeSource(sourceClock);
|
||||
}
|
||||
|
||||
public void ResetLocalAdjustments()
|
||||
{
|
||||
// In the case of replays, we may have changed the playback rate.
|
||||
UserPlaybackRate.Value = 1;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
if (!IsPaused.Value)
|
||||
@ -198,6 +194,14 @@ namespace osu.Game.Screens.Play
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
removeSourceClockAdjustments();
|
||||
sourceClock = null;
|
||||
}
|
||||
|
||||
private void removeSourceClockAdjustments()
|
||||
{
|
||||
sourceClock.ResetSpeedAdjustments();
|
||||
(sourceClock as IAdjustableAudioComponent)?.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
||||
}
|
||||
}
|
||||
|
@ -536,8 +536,6 @@ namespace osu.Game.Screens.Play
|
||||
return true;
|
||||
}
|
||||
|
||||
GameplayClockContainer.ResetLocalAdjustments();
|
||||
|
||||
// GameplayClockContainer performs seeks / start / stop operations on the beatmap's track.
|
||||
// as we are no longer the current screen, we cannot guarantee the track is still usable.
|
||||
GameplayClockContainer.StopUsingBeatmapClock();
|
||||
|
Loading…
Reference in New Issue
Block a user