public void DeserializeExtraData(BinaryReader reader)
 {
     if (IsStreaming)
     {
         StreamInfo = StreamHandle.FromData(reader);
     }
 }
        public void DeserializeExtraData(BinaryReader reader)
        {
            uint dataLength = reader.ReadUInt32();

            if (dataLength > 0)
            {
                MusicData = reader.ReadBytesStrict(dataLength);
            }

            StreamInfo = new StreamHandle[StreamingBankNames.Count];

            for (uint i = 0; i < StreamInfo.Length; i++)
            {
                StreamInfo[i] = StreamHandle.FromData(reader);
            }
        }
Beispiel #3
0
 public static HwBuffer FromData(BinaryReader reader, EDataBufferFormat format, bool streaming, uint byteStride, uint elementCount)
 {
     if (streaming)
     {
         return new HwBuffer {
                    StreamInfo = StreamHandle.FromData(reader)
         }
     }
     ;
     else
     {
         return new HwBuffer {
                    Data = reader.ReadBytesStrict(elementCount * byteStride)
         }
     };
 }
Beispiel #4
0
        public static HwBuffer FromData(BinaryReader reader, EDataBufferFormat format, bool streaming, uint byteStride, uint elementCount)
        {
            var buffer = new HwBuffer
            {
                Format        = format,
                ElementStride = byteStride,
                ElementCount  = elementCount,
            };

            if (streaming)
            {
                buffer.StreamInfo = StreamHandle.FromData(reader);
            }
            else
            {
                buffer.Data = reader.ReadBytesStrict(elementCount * byteStride);
            }

            return(buffer);
        }