From 3c50c37373f50deada7f6aafbba7e69f6081f022 Mon Sep 17 00:00:00 2001 From: iAmAsval Date: Wed, 8 Jul 2020 18:05:08 +0200 Subject: [PATCH] Valorant voice line support --- FModel/PakReader/WwiseReader.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FModel/PakReader/WwiseReader.cs b/FModel/PakReader/WwiseReader.cs index 5bc3b85f..002ab042 100644 --- a/FModel/PakReader/WwiseReader.cs +++ b/FModel/PakReader/WwiseReader.cs @@ -20,6 +20,7 @@ namespace FModel.PakReader private const uint _DIDX_ID = 0x58444944; private const uint _DATA_ID = 0x41544144; private const uint _HIRC_ID = 0x43524948; + private const uint _RIFF_ID = 0x46464952; private const uint _STID_ID = 0x44495453; private const uint _STMG_ID = 0x474D5453; private const uint _ENVS_ID = 0x53564E45; @@ -28,6 +29,7 @@ namespace FModel.PakReader public WwiseReader(BinaryReader reader) { + Random rnd = new Random(); DIDXSection didxSection = null; DATASection dataSection = null; HIRCSection hircSection = null; @@ -59,6 +61,10 @@ namespace FModel.PakReader case _HIRC_ID: hircSection = new HIRCSection(reader); break; + case _RIFF_ID: + reader.BaseStream.Seek(Position - sizeof(uint) - sizeof(uint), SeekOrigin.Begin); + AudioFiles[$"{rnd.Next(1000000, 9999999)}.wem"] = reader.ReadBytes(Convert.ToInt32(SectionLength)); + break; case _STID_ID: stidSection = new STIDSection(reader); break;