Ejemplo n.º 1
0
            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;
                }
            }
Ejemplo n.º 2
0
 public SWAV(SWAV.SWAVInfo Info, byte[] Data)
 {
     this.Data = new SWAV.DataSection(Info, Data);
 }
Ejemplo n.º 3
0
 public DataSection(SWAV.SWAVInfo Info, byte[] Data)
 {
     this.Header = new DataBlockHeader("DATA", (uint)(20 + Data.Length));
     this.Info   = Info;
     this.Data   = Data;
 }