mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 03:13:21 +08:00
Change IApplicableToSample
to receive adjustable component instead
Done for consistency with `IApplicableToTrack`.
This commit is contained in:
parent
4f5001704e
commit
82b784ce5a
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Graphics.Audio;
|
using osu.Framework.Audio;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToSample : IApplicableMod
|
public interface IApplicableToSample : IApplicableMod
|
||||||
{
|
{
|
||||||
void ApplyToSample(DrawableSample sample);
|
void ApplyToSample(IAdjustableAudioComponent sample);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Audio;
|
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
@ -150,7 +149,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
recentRates.AddRange(Enumerable.Repeat(InitialRate.Value, recent_rate_count));
|
recentRates.AddRange(Enumerable.Repeat(InitialRate.Value, recent_rate_count));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyToSample(DrawableSample sample)
|
public void ApplyToSample(IAdjustableAudioComponent sample)
|
||||||
{
|
{
|
||||||
sample.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
sample.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Audio;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
@ -19,7 +18,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
track.AddAdjustment(AdjustableProperty.Tempo, SpeedChange);
|
track.AddAdjustment(AdjustableProperty.Tempo, SpeedChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ApplyToSample(DrawableSample sample)
|
public virtual void ApplyToSample(IAdjustableAudioComponent sample)
|
||||||
{
|
{
|
||||||
sample.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
sample.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Audio;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
@ -62,7 +61,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
AdjustPitch.TriggerChange();
|
AdjustPitch.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplyToSample(DrawableSample sample)
|
public void ApplyToSample(IAdjustableAudioComponent sample)
|
||||||
{
|
{
|
||||||
sample.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
sample.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user