Beispiel #1
0
 public object GetDataAsStructure(StructureBuilder s)
 {
     riffFile.BaseStream.Position = dataOffset;
     if (s.Length != chunkSize)
     {
         throw new ApplicationException(String.Format("Chunk size is: {0} so can't read structure of: {1}", chunkSize,
                                                      s.Length));
     }
     return(s.Read(riffFile));
 }
Beispiel #2
0
        public object[] GetDataAsStructureArray(StructureBuilder s)
        {
            riffFile.BaseStream.Position = dataOffset;
            if (chunkSize % s.Length != 0)
            {
                throw new ApplicationException(String.Format("Chunk size is: {0} not a multiple of structure size: {1}", chunkSize,
                                                             s.Length));
            }
            var structuresToRead = (int)(chunkSize / s.Length);
            var a = new object[structuresToRead];

            for (int n = 0; n < structuresToRead; n++)
            {
                a[n] = s.Read(riffFile);
            }
            return(a);
        }
Beispiel #3
0
		public object[] GetDataAsStructureArray(StructureBuilder s)
		{
			riffFile.BaseStream.Position = dataOffset;
			if (chunkSize%s.Length != 0)
			{
				throw new ApplicationException(String.Format("Chunk size is: {0} not a multiple of structure size: {1}", chunkSize,
				                                             s.Length));
			}
			var structuresToRead = (int) (chunkSize/s.Length);
			var a = new object[structuresToRead];
			for (int n = 0; n < structuresToRead; n++)
			{
				a[n] = s.Read(riffFile);
			}
			return a;
		}
Beispiel #4
0
		public object GetDataAsStructure(StructureBuilder s)
		{
			riffFile.BaseStream.Position = dataOffset;
			if (s.Length != chunkSize)
			{
				throw new ApplicationException(String.Format("Chunk size is: {0} so can't read structure of: {1}", chunkSize,
				                                             s.Length));
			}
			return s.Read(riffFile);
		}