diff --git a/GameRes/AudioWAV.cs b/GameRes/AudioWAV.cs index 3aa1e44c..165f529d 100644 --- a/GameRes/AudioWAV.cs +++ b/GameRes/AudioWAV.cs @@ -105,11 +105,15 @@ namespace GameRes public override string Description { get { return "Wave audio format"; } } public override uint Signature { get { return 0x46464952; } } // 'RIFF' + static readonly HashSet EmbeddedFormats = new HashSet { + 0x674f, 0x6751, 0x6771, // Vorbis + 0x0055, // MpegLayer3 + }; + public override SoundInput TryOpen (Stream file) { SoundInput sound = new WaveInput (file); - if (0x674f == sound.Format.FormatTag || 0x6771 == sound.Format.FormatTag // Vorbis - || 0x0055 == sound.Format.FormatTag) // MpegLayer3 + if (EmbeddedFormats.Contains (sound.Format.FormatTag)) { try {