public RiffHeader(uint type) { Type = type; HeaderBlockHeader = new RiffBlockHeader(); HeaderBlockHeader.FourCC = Reinterpret.FourCC("RIFF", ByteOrder.BigEndian); HeaderBlockHeader.Length = 4; }
internal RiffBlock(Stream stream) { int headerLength = Marshal.SizeOf(typeof(RiffBlockHeader)); data = new byte[headerLength]; stream.Read(data, 0, headerLength); header = Reinterpret.Memory <RiffBlockHeader>(data); if (header.Length == 0) { data = new byte[0]; } else { data = new byte[header.Length]; stream.Read(data, 0, header.Length); } }
internal RiffBlock(byte[] resourceData, string fourcc) { data = resourceData; header = new RiffBlockHeader(Reinterpret.FourCC(fourcc, ByteOrder.BigEndian), data.Length); }