mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 05:35:34 +08:00
(AOG): another version.
This commit is contained in:
parent
fada8e0b40
commit
5bc2d0ff45
@ -38,10 +38,16 @@ namespace GameRes.Formats.Aoi
|
|||||||
|
|
||||||
public override SoundInput TryOpen (IBinaryStream file)
|
public override SoundInput TryOpen (IBinaryStream file)
|
||||||
{
|
{
|
||||||
var header = file.ReadHeader (0x30);
|
var header = file.ReadHeader (0x3C);
|
||||||
if (!header.AsciiEqual (0, "AoiOgg") || !header.AsciiEqual (0x2C, "OggS"))
|
if (!header.AsciiEqual (0, "AoiOgg"))
|
||||||
|
return null;
|
||||||
|
Stream ogg;
|
||||||
|
if (header.AsciiEqual (0x2C, "OggS"))
|
||||||
|
ogg = new StreamRegion (file.AsStream, 0x2C);
|
||||||
|
else if (header.AsciiEqual (0xC, "Decode") && header.AsciiEqual (0x38, "OggS"))
|
||||||
|
ogg = new StreamRegion (file.AsStream, 0x38);
|
||||||
|
else
|
||||||
return null;
|
return null;
|
||||||
var ogg = new StreamRegion (file.AsStream, 0x2C);
|
|
||||||
return new OggInput (ogg);
|
return new OggInput (ogg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user