diff --git a/osu.Game/Audio/SampleInfo.cs b/osu.Game/Audio/SampleInfo.cs
index 7e329ac651..9ed40c648e 100644
--- a/osu.Game/Audio/SampleInfo.cs
+++ b/osu.Game/Audio/SampleInfo.cs
@@ -29,6 +29,11 @@ namespace osu.Game.Audio
///
public string Name;
+ ///
+ /// An optional suffix to provide priority lookup. Falls back to non-suffixed .
+ ///
+ public string Suffix;
+
///
/// The sample volume.
///
@@ -41,9 +46,15 @@ namespace osu.Game.Audio
{
get
{
+ if (!string.IsNullOrEmpty(Suffix))
+ {
+ if (!string.IsNullOrEmpty(Namespace))
+ yield return $"{Namespace}/{Bank}-{Name}{Suffix}";
+ yield return $"{Bank}-{Name}{Suffix}"; // Without namespace as a fallback even when we have a namespace
+ }
+
if (!string.IsNullOrEmpty(Namespace))
yield return $"{Namespace}/{Bank}-{Name}";
-
yield return $"{Bank}-{Name}"; // Without namespace as a fallback even when we have a namespace
}
}
diff --git a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs
index 22a6acf459..c8874c3bc7 100644
--- a/osu.Game/Beatmaps/Formats/LegacyDecoder.cs
+++ b/osu.Game/Beatmaps/Formats/LegacyDecoder.cs
@@ -179,7 +179,7 @@ namespace osu.Game.Beatmaps.Formats
var baseInfo = base.ApplyTo(sampleInfo);
if (CustomSampleBank > 1)
- baseInfo.Name += CustomSampleBank;
+ baseInfo.Suffix = CustomSampleBank.ToString();
return baseInfo;
}