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)); }
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); }
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; }
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); }