Allow use rate adjust to fallback to clock rate adjust

This commit is contained in:
Dean Herbert 2019-03-12 18:14:01 +09:00
parent cdeaa80fea
commit c1a356161f
1 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@
using System.Threading.Tasks;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -142,7 +143,11 @@ private void updateRate()
if (sourceClock == null) return;
sourceClock.ResetSpeedAdjustments();
sourceClock.Rate = UserPlaybackRate.Value;
if (sourceClock is IHasTempoAdjust tempo)
tempo.TempoAdjust = UserPlaybackRate.Value;
else
sourceClock.Rate = UserPlaybackRate.Value;
foreach (var mod in beatmap.Mods.Value.OfType<IApplicableToClock>())
mod.ApplyToClock(sourceClock);