public void GetSoundbanks() { foreach (ulong key in TrackedFiles[0x43]) { // using (FileStream fs = File.OpenRead("C:\\Users\\ZingBallyhoo\\Downloads\\Wood.bnk")) { // Sound.WwiseBank tempBnk = new Sound.WwiseBank(fs); // } using (Stream stream = OpenFile(key)) { Sound.WwiseBank wwiseBank = new Sound.WwiseBank(stream); } } }
public void SaveSounds(ICLIFlags toolFlags) { string basePath; if (toolFlags is ExtractFlags flags) { basePath = flags.OutputPath; } else { throw new Exception("no output path"); } foreach (ulong key in TrackedFiles[0x2C]) { if (GUID.Index(key) != 0x3BAF) { continue; // used in Reaper's Eternal Rest intro. (eerie background + door break) } STUSound sound = GetInstance <STUSound>(key); Dictionary <uint, Common.STUGUID> soundIDs = new Dictionary <uint, Common.STUGUID>(); if (sound.Inner == null) { continue; } STUSoundbankDataVersion inner = sound.Inner; for (int i = 0; i < inner.IDs.Length; i++) { soundIDs[inner.IDs[i]] = inner.Sounds[i]; } using (Stream bnkStream = OpenFile(inner.Soundbank)) { Sound.WwiseBank bank = new Sound.WwiseBank(bnkStream); } } }