mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Adjust sample rate by UserPlaybackRate
This commit is contained in:
parent
470d5bfce3
commit
4c28347686
@ -95,7 +95,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public bool LoadedBeatmapSuccessfully => DrawableRuleset?.Objects.Any() == true;
|
||||
|
||||
protected GameplayClockContainer GameplayClockContainer { get; private set; }
|
||||
public GameplayClockContainer GameplayClockContainer { get; private set; }
|
||||
|
||||
public DimmableStoryboard DimmableStoryboard { get; private set; }
|
||||
|
||||
|
@ -4,11 +4,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Storyboards.Drawables
|
||||
{
|
||||
@ -32,7 +34,7 @@ namespace osu.Game.Storyboards.Drawables
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(IBindable<WorkingBeatmap> beatmap, IBindable<IReadOnlyList<Mod>> mods)
|
||||
private void load(IBindable<WorkingBeatmap> beatmap, IBindable<IReadOnlyList<Mod>> mods, Player player)
|
||||
{
|
||||
Channel = beatmap.Value.Skin.GetSample(sampleInfo);
|
||||
if (Channel == null)
|
||||
@ -42,6 +44,8 @@ namespace osu.Game.Storyboards.Drawables
|
||||
|
||||
foreach (var mod in mods.Value.OfType<IApplicableToSample>())
|
||||
mod.ApplyToSample(Channel);
|
||||
|
||||
Channel.AddAdjustment(AdjustableProperty.Frequency, player.GameplayClockContainer.UserPlaybackRate);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
Loading…
Reference in New Issue
Block a user