using System.Xml.Serialization; using Newtonsoft.Json; using SabreTools.Data.Extensions; namespace SabreTools.Metadata.DatItems.Formats { /// /// Represents the sound output for a machine /// [JsonObject("sound"), XmlRoot("sound")] public sealed class Sound : DatItem { #region Fields /// /> protected override ItemType ItemType => ItemType.Sound; #endregion #region Constructors public Sound() : base() { } public Sound(Data.Models.Metadata.Sound item) : base(item) { // Process flag values long? channels = ReadLong(Data.Models.Metadata.Sound.ChannelsKey); if (channels is not null) Write(Data.Models.Metadata.Sound.ChannelsKey, channels.ToString()); } public Sound(Data.Models.Metadata.Sound item, Machine machine, Source source) : this(item) { Write(SourceKey, source); CopyMachineInformation(machine); } #endregion #region Cloning Methods /// public override object Clone() => new Sound(_internal.Clone() as Data.Models.Metadata.Sound ?? []); #endregion } }