Move filter reset to more appropriate location

This commit is contained in:
Dean Herbert 2022-06-15 17:31:45 +09:00
parent 1f1633ddc2
commit 94aa2248ca

View File

@ -88,20 +88,17 @@ namespace osu.Game.Overlays.Dialog
{
if (!e.HasAnyButtonPressed)
{
lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
AbortConfirm();
}
}
private void progressChanged(ValueChangedEvent<double> progress)
{
if (progress.NewValue < progress.OldValue)
{
lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
return;
}
if (progress.NewValue < progress.OldValue) return;
if (Clock.CurrentTime - lastTickPlaybackTime < 30) return;
if (Clock.CurrentTime - lastTickPlaybackTime >= 30)
{
lowPassFilter.CutoffTo((int)(progress.NewValue * AudioFilter.MAX_LOWPASS_CUTOFF * 0.5));
tickSample.Frequency.Value = 1 + progress.NewValue * 0.5f;
@ -112,5 +109,4 @@ namespace osu.Game.Overlays.Dialog
}
}
}
}
}