private void ReadChunk(ByteArray aByteArray) { string lId = aByteArray.ReadString(4); Logger.LogNormal("ID:" + lId); UInt32 lSize = aByteArray.ReadUInt32(); int lPositionStart = aByteArray.Position; // Padding. if (lSize % 2 == 1) { if (lPositionStart + lSize <= aByteArray.Length && aByteArray.ReadByte(( int )(lPositionStart + lSize)) == 0x00) { lSize++; Logger.LogWarning("Padding:" + lSize); } aByteArray.SetPosition(lPositionStart); } FormChunk lRiffChunk = Construct(lId, lSize, aByteArray, this); chunkList.Add(lRiffChunk); }
protected void OverrideChunk(FormChunk aChunk) { for (int i = 0; i < chunkList.Count; i++) { if (chunkList[i].id == aChunk.id) { chunkList[i] = aChunk; return; } } }
protected void AddChunk(FormChunk aRiffChunk) { chunkList.Add(aRiffChunk); }