using System; using System.IO; namespace NAudio.SoundFont { /// /// Builds a SoundFont version /// class SFVersionBuilder : StructureBuilder { /// /// Reads a SoundFont Version structure /// public override SFVersion Read(BinaryReader br) { SFVersion v = new SFVersion(); v.Major = br.ReadInt16(); v.Minor = br.ReadInt16(); data.Add(v); return v; } /// /// Writes a SoundFont Version structure /// public override void Write(BinaryWriter bw, SFVersion v) { bw.Write(v.Major); bw.Write(v.Minor); } /// /// Gets the length of this structure /// public override int Length { get { return 4; } } } }