implement the fact chunk for WAVE files

This commit is contained in:
Matthias Mailänder
2013-06-15 16:51:34 +02:00
parent 85da51ca09
commit 9fb98f04d4

View File

@@ -32,6 +32,9 @@ namespace OpenRA.FileFormats
public readonly int ListChunkSize; public readonly int ListChunkSize;
public readonly int FactChunkSize;
public readonly int Samples;
public WavLoader(Stream s) public WavLoader(Stream s)
{ {
while (s.Position < s.Length) while (s.Position < s.Length)
@@ -69,6 +72,10 @@ namespace OpenRA.FileFormats
ListChunkSize = s.ReadInt32(); ListChunkSize = s.ReadInt32();
s.ReadBytes(ListChunkSize); // Ignore annotation meta data. s.ReadBytes(ListChunkSize); // Ignore annotation meta data.
break; break;
case "fact":
FactChunkSize = s.ReadInt32();
Samples = s.ReadInt32();
break;
default: default:
throw new NotSupportedException("{0} chunks are not supported.".F(type)); throw new NotSupportedException("{0} chunks are not supported.".F(type));
} }