mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Change IApplicableToTrack
to receive adjustable component instead
This commit is contained in:
@ -5,7 +5,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Audio;
|
||||
using osu.Framework.Utils;
|
||||
@ -79,7 +78,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
// Apply a fixed rate change when missing, allowing the player to catch up when the rate is too fast.
|
||||
private const double rate_change_on_miss = 0.95d;
|
||||
|
||||
private ITrack track;
|
||||
private IAdjustableAudioComponent track;
|
||||
private double targetRate = 1d;
|
||||
|
||||
/// <summary>
|
||||
@ -141,7 +140,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
AdjustPitch.BindValueChanged(adjustPitchChanged);
|
||||
}
|
||||
|
||||
public void ApplyToTrack(ITrack track)
|
||||
public void ApplyToTrack(IAdjustableAudioComponent track)
|
||||
{
|
||||
this.track = track;
|
||||
|
||||
@ -210,7 +209,6 @@ namespace osu.Game.Rulesets.Mods
|
||||
private void adjustPitchChanged(ValueChangedEvent<bool> adjustPitchSetting)
|
||||
{
|
||||
track?.RemoveAdjustment(adjustmentForPitchSetting(adjustPitchSetting.OldValue), SpeedChange);
|
||||
|
||||
track?.AddAdjustment(adjustmentForPitchSetting(adjustPitchSetting.NewValue), SpeedChange);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user