コード例 #1
0
 public RiffHeader(uint type)
 {
     Type = type;
     HeaderBlockHeader        = new RiffBlockHeader();
     HeaderBlockHeader.FourCC = Reinterpret.FourCC("RIFF", ByteOrder.BigEndian);
     HeaderBlockHeader.Length = 4;
 }
コード例 #2
0
            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);
                }
            }
コード例 #3
0
 internal RiffBlock(byte[] resourceData, string fourcc)
 {
     data   = resourceData;
     header = new RiffBlockHeader(Reinterpret.FourCC(fourcc, ByteOrder.BigEndian), data.Length);
 }