public DataSection(EndianBinaryReader er, out bool OK) { bool OK1; this.Header = new DataBlockHeader(er, "DATA", out OK1); if (!OK1) { OK = false; } else { long position = er.BaseStream.Position; this.Info = new SWAV.SWAVInfo(er); if (this.Info.nWaveType == (byte)2) { er.BaseStream.Position = position + 12L; this.Data = er.ReadBytes((int)((long)((int)this.Info.nLoopOffset * 4) + (long)(this.Info.nNonLoopLen * 4U) - 4L)); } else { this.Data = er.ReadBytes((int)(er.BaseStream.Length - er.BaseStream.Position)); } OK = true; } }
public SWAV(SWAV.SWAVInfo Info, byte[] Data) { this.Data = new SWAV.DataSection(Info, Data); }
public DataSection(SWAV.SWAVInfo Info, byte[] Data) { this.Header = new DataBlockHeader("DATA", (uint)(20 + Data.Length)); this.Info = Info; this.Data = Data; }