mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Remove generics from IApplicableToTrack
This commit is contained in:
parent
c8ebbc8594
commit
7c3ae4ed42
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
@ -11,6 +10,6 @@ namespace osu.Game.Rulesets.Mods
|
||||
/// </summary>
|
||||
public interface IApplicableToTrack : IApplicableMod
|
||||
{
|
||||
void ApplyToTrack<T>(T track) where T : class, ITrack, IAdjustableAudioComponent;
|
||||
void ApplyToTrack(ITrack track);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
|
||||
@ -26,11 +27,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
}, true);
|
||||
}
|
||||
|
||||
public override void ApplyToTrack<T>(T track)
|
||||
public override void ApplyToTrack(ITrack track)
|
||||
{
|
||||
// base.ApplyToTrack() intentionally not called (different tempo adjustment is applied)
|
||||
track.AddAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||
track.AddAdjustment(AdjustableProperty.Tempo, tempoAdjust);
|
||||
(track as IAdjustableAudioComponent)?.AddAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||
(track as IAdjustableAudioComponent)?.AddAdjustment(AdjustableProperty.Tempo, tempoAdjust);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,11 +38,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
}, true);
|
||||
}
|
||||
|
||||
public override void ApplyToTrack<T>(T track)
|
||||
public override void ApplyToTrack(ITrack track)
|
||||
{
|
||||
// base.ApplyToTrack() intentionally not called (different tempo adjustment is applied)
|
||||
track.AddAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||
track.AddAdjustment(AdjustableProperty.Tempo, tempoAdjust);
|
||||
(track as IAdjustableAudioComponent)?.AddAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||
(track as IAdjustableAudioComponent)?.AddAdjustment(AdjustableProperty.Tempo, tempoAdjust);
|
||||
}
|
||||
|
||||
public void ApplyToDrawableRuleset(DrawableRuleset<TObject> drawableRuleset)
|
||||
|
@ -12,10 +12,9 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
public abstract BindableNumber<double> SpeedChange { get; }
|
||||
|
||||
public virtual void ApplyToTrack<T>(T track)
|
||||
where T : class, ITrack, IAdjustableAudioComponent
|
||||
public virtual void ApplyToTrack(ITrack track)
|
||||
{
|
||||
track.AddAdjustment(AdjustableProperty.Tempo, SpeedChange);
|
||||
(track as IAdjustableAudioComponent)?.AddAdjustment(AdjustableProperty.Tempo, SpeedChange);
|
||||
}
|
||||
|
||||
public virtual void ApplyToSample(SampleChannel sample)
|
||||
|
@ -51,8 +51,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
AdjustPitch.BindValueChanged(applyPitchAdjustment);
|
||||
}
|
||||
|
||||
public void ApplyToTrack<T>(T track)
|
||||
where T : class, ITrack, IAdjustableAudioComponent
|
||||
public void ApplyToTrack(ITrack track)
|
||||
{
|
||||
this.track = track;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user