mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(WaveAudio): recognize mp3-tagged streams.
This commit is contained in:
parent
a313a32c03
commit
8f77fde7d5
@ -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 */ }
|
||||
|
Loading…
Reference in New Issue
Block a user