using System; using System.Collections.Generic; namespace Quaver.API.Maps.Structures { /// /// KeySounds property of hit objects. /// [Serializable] public class KeySoundInfo { /// /// The one-based index of the sound sample in the CustomAudioSamples array. /// public int Sample { get; set; } /// /// The volume of the sound sample. Defaults to 100. /// public int Volume { get; set; } /// /// By-value comparer, auto-generated by Rider. /// private sealed class ByValueEqualityComparer : IEqualityComparer { public bool Equals(KeySoundInfo x, KeySoundInfo y) { if (ReferenceEquals(x, y)) return true; if (ReferenceEquals(x, null)) return false; if (ReferenceEquals(y, null)) return false; if (x.GetType() != y.GetType()) return false; return x.Sample == y.Sample && x.Volume == y.Volume; } public int GetHashCode(KeySoundInfo obj) { unchecked { return (obj.Sample * 397) ^ obj.Volume; } } } public static IEqualityComparer ByValueComparer { get; } = new ByValueEqualityComparer(); } }