diff --git a/OpenRA.Mods.Cnc/AudioLoaders/AudLoader.cs b/OpenRA.Mods.Cnc/AudioLoaders/AudLoader.cs index 3cad70667f..5d652df4ce 100644 --- a/OpenRA.Mods.Cnc/AudioLoaders/AudLoader.cs +++ b/OpenRA.Mods.Cnc/AudioLoaders/AudLoader.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.Cnc.AudioLoaders var readFormat = s.ReadByte(); s.Position = start; - return Enum.IsDefined(typeof(SoundFormat), readFormat); + return readFormat == (int)SoundFormat.ImaAdpcm; } bool ISoundLoader.TryParseSound(Stream stream, out ISoundFormat sound) diff --git a/OpenRA.Mods.Cnc/FileFormats/AudReader.cs b/OpenRA.Mods.Cnc/FileFormats/AudReader.cs index 977df37b78..0a77c9f885 100644 --- a/OpenRA.Mods.Cnc/FileFormats/AudReader.cs +++ b/OpenRA.Mods.Cnc/FileFormats/AudReader.cs @@ -66,6 +66,9 @@ namespace OpenRA.Mods.Cnc.FileFormats if (!Enum.IsDefined(typeof(SoundFormat), readFormat)) return false; + if (readFormat == (int)SoundFormat.WestwoodCompressed) + throw new NotImplementedException(); + var offsetPosition = s.Position; result = () =>