2026-04-03 10:04:32 -04:00
|
|
|
using System;
|
2025-09-26 10:20:48 -04:00
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
2025-09-26 13:06:18 -04:00
|
|
|
namespace SabreTools.Data.Models.Metadata
|
2025-09-26 10:20:48 -04:00
|
|
|
{
|
|
|
|
|
[JsonObject("sound"), XmlRoot("sound")]
|
2026-04-03 10:04:32 -04:00
|
|
|
public class Sound : DatItem, ICloneable, IEquatable<Sound>
|
2025-09-26 10:20:48 -04:00
|
|
|
{
|
2026-04-02 22:45:33 -04:00
|
|
|
#region Properties
|
2025-09-26 10:20:48 -04:00
|
|
|
|
2026-04-02 22:45:33 -04:00
|
|
|
public long? Channels { get; set; }
|
2025-09-26 10:20:48 -04:00
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
2026-04-01 11:24:33 -04:00
|
|
|
public Sound() => ItemType = ItemType.Sound;
|
2026-04-03 10:04:32 -04:00
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public object Clone()
|
|
|
|
|
{
|
|
|
|
|
var obj = new Sound();
|
|
|
|
|
|
|
|
|
|
obj.Channels = Channels;
|
|
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public bool Equals(Sound? other)
|
|
|
|
|
{
|
|
|
|
|
// Null never matches
|
|
|
|
|
if (other is null)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
// Properties
|
|
|
|
|
if (Channels != other.Channels)
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2025-09-26 10:20:48 -04:00
|
|
|
}
|
|
|
|
|
}
|