HaloMap.RawData.Sound.ReadH1SoundData C# (CSharp) Method

ReadH1SoundData() public method

The read h 1 sound data.
public ReadH1SoundData ( int TagIndex, Map map, bool dontreadraw ) : void
TagIndex int The TagIndex.
map HaloMap.Map.Map The map.
dontreadraw bool The dontreadraw.
return void
        public void ReadH1SoundData(int TagIndex, Map map, bool dontreadraw)
        {
            map.BR.BaseStream.Position = map.MetaInfo.Offset[TagIndex] + 152;
            int tempc = map.BR.ReadInt32();
            int tempr = map.BR.ReadInt32() - map.PrimaryMagic;
            map.BR.BaseStream.Position = tempr + 60;
            tempc = map.BR.ReadInt32();
            tempr = map.BR.ReadInt32() - map.PrimaryMagic;
            for (int x = 0; x < tempc; x++)
            {
                RawDataChunk Raw = new RawDataChunk();
                Raw.pointerMetaOffset = tempr + (x * 124) + 64 - map.MetaInfo.Offset[TagIndex];
                map.BR.BaseStream.Position = map.MetaInfo.Offset[TagIndex] + Raw.pointerMetaOffset;
                Raw.rawDataType = RawDataType.snd1;
                Raw.size = map.BR.ReadInt32();
                map.BR.ReadInt32();
                Raw.offset = map.BR.ReadInt32();

                if (dontreadraw == false)
                {
                    map.BR.BaseStream.Position = Raw.offset;
                    Raw.MS = new MemoryStream(Raw.size);
                    Raw.MS.Write(map.BR.ReadBytes(Raw.size), 0, Raw.size);
                }

                this.rawChunks.Add(Raw);
            }
        }