From 8f77fde7d59fb6f697e5be53c1b3c56ba795c97d Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 15 May 2015 17:33:08 +0400 Subject: [PATCH] (WaveAudio): recognize mp3-tagged streams. --- GameRes/AudioWAV.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GameRes/AudioWAV.cs b/GameRes/AudioWAV.cs index dfb5aac3..127facb3 100644 --- a/GameRes/AudioWAV.cs +++ b/GameRes/AudioWAV.cs @@ -101,15 +101,16 @@ namespace GameRes public override SoundInput TryOpen (Stream file) { SoundInput sound = new WaveInput (file); - if (0x674f == sound.Format.FormatTag || 0x6771 == sound.Format.FormatTag) + if (0x674f == sound.Format.FormatTag || 0x6771 == sound.Format.FormatTag // Vorbis + || 0x0055 == sound.Format.FormatTag) // MpegLayer3 { try { - var ogg = AudioFormat.Read (sound); - if (null != ogg) + var embedded = AudioFormat.Read (sound); + if (null != embedded) { sound.Dispose(); - sound = ogg; + sound = embedded; } } catch { /* ignore errors */ }