diff --git a/osu.Game/Audio/SampleInfo.cs b/osu.Game/Audio/SampleInfo.cs
index f635b74030..53b6e439f5 100644
--- a/osu.Game/Audio/SampleInfo.cs
+++ b/osu.Game/Audio/SampleInfo.cs
@@ -32,5 +32,7 @@ namespace osu.Game.Audio
/// The sample volume.
///
public int Volume;
+
+ public SampleInfo Clone() => (SampleInfo)MemberwiseClone();
}
}
diff --git a/osu.Game/Beatmaps/ControlPoints/SampleControlPoint.cs b/osu.Game/Beatmaps/ControlPoints/SampleControlPoint.cs
index 11de392d14..77d42551c6 100644
--- a/osu.Game/Beatmaps/ControlPoints/SampleControlPoint.cs
+++ b/osu.Game/Beatmaps/ControlPoints/SampleControlPoint.cs
@@ -36,12 +36,14 @@ namespace osu.Game.Beatmaps.ControlPoints
///
/// The . This will not be modified.
/// The modified . This does not share a reference with .
- public virtual SampleInfo ApplyTo(SampleInfo sampleInfo) => new SampleInfo
+ public virtual SampleInfo ApplyTo(SampleInfo sampleInfo)
{
- Bank = sampleInfo.Bank ?? SampleBank,
- Name = sampleInfo.Name,
- Volume = sampleInfo.Volume > 0 ? sampleInfo.Volume : SampleVolume
- };
+ var newSampleInfo = sampleInfo.Clone();
+ newSampleInfo.Bank = sampleInfo.Bank ?? SampleBank;
+ newSampleInfo.Name = sampleInfo.Name;
+ newSampleInfo.Volume = sampleInfo.Volume > 0 ? sampleInfo.Volume : SampleVolume;
+ return newSampleInfo;
+ }
public override bool ChangeEquals(ControlPoint other)
=> base.ChangeEquals(other)