OpenRA.FileFormats.VocFormat.CheckVocHeader C# (CSharp) Method

CheckVocHeader() private method

private CheckVocHeader ( ) : void
return void
        void CheckVocHeader()
        {
            var vfh = VocFileHeader.Read(stream);

            if (!vfh.Description.StartsWith("Creative Voice File"))
                throw new InvalidDataException("Voc header description not recognized");
            if (vfh.DatablockOffset != 26)
                throw new InvalidDataException("Voc header offset is wrong");
            if (vfh.Version != 0x010A)
                throw new InvalidDataException("Voc header version not recognized");
            if (vfh.ID != ~vfh.Version + 0x1234)
                throw new InvalidDataException("Voc header id is bogus - expected: " +
                    (~vfh.Version + 0x1234).ToString("X") + " but value is : " + vfh.ID.ToString("X"));
        }