Beispiel #1
0
        public XactClip(SoundBank soundBank, BinaryReader clipReader, uint clipOffset)
        {
            long position = clipReader.BaseStream.Position;

            clipReader.BaseStream.Seek((long)clipOffset, SeekOrigin.Begin);
            byte num1 = clipReader.ReadByte();

            this.events = new XactClip.ClipEvent[(int)num1];
            for (int index = 0; index < (int)num1; ++index)
            {
                if ((int)(clipReader.ReadUInt32() & 31U) != 1)
                {
                    throw new NotImplementedException();
                }
                XactClip.EventPlayWave eventPlayWave = new XactClip.EventPlayWave();
                int  num2          = (int)clipReader.ReadUInt32();
                uint trackIndex    = (uint)clipReader.ReadUInt16();
                byte waveBankIndex = clipReader.ReadByte();
                int  num3          = (int)clipReader.ReadByte();
                int  num4          = (int)clipReader.ReadUInt16();
                int  num5          = (int)clipReader.ReadUInt16();
                eventPlayWave.wave      = soundBank.GetWave(waveBankIndex, trackIndex);
                this.events[index]      = (XactClip.ClipEvent)eventPlayWave;
                this.events[index].clip = this;
            }
            clipReader.BaseStream.Seek(position, SeekOrigin.Begin);
        }
Beispiel #2
0
 public XactClip(SoundBank soundBank, BinaryReader clipReader, uint clipOffset)
 {
   long position = clipReader.BaseStream.Position;
   clipReader.BaseStream.Seek((long) clipOffset, SeekOrigin.Begin);
   byte num1 = clipReader.ReadByte();
   this.events = new XactClip.ClipEvent[(int) num1];
   for (int index = 0; index < (int) num1; ++index)
   {
     if ((int) (clipReader.ReadUInt32() & 31U) != 1)
       throw new NotImplementedException();
     XactClip.EventPlayWave eventPlayWave = new XactClip.EventPlayWave();
     int num2 = (int) clipReader.ReadUInt32();
     uint trackIndex = (uint) clipReader.ReadUInt16();
     byte waveBankIndex = clipReader.ReadByte();
     int num3 = (int) clipReader.ReadByte();
     int num4 = (int) clipReader.ReadUInt16();
     int num5 = (int) clipReader.ReadUInt16();
     eventPlayWave.wave = soundBank.GetWave(waveBankIndex, trackIndex);
     this.events[index] = (XactClip.ClipEvent) eventPlayWave;
     this.events[index].clip = this;
   }
   clipReader.BaseStream.Seek(position, SeekOrigin.Begin);
 }