diff --git a/extract.py b/extract.py index d9aa31a..57b581e 100644 --- a/extract.py +++ b/extract.py @@ -1,5 +1,6 @@ import os import io +import json import wwise import tempfile import wavescan @@ -159,9 +160,22 @@ class WwiseExtract: filename = f"{filename} (hdiff)" files = [*files[0], *files[1]] + # in case of manual use of mapping, use this + # load json here + + # handle = open("banks.json", "r") + # banks = json.loads(handle.read()) + # handle.close() + for file in files: if mapper is not None: key = mapper.get_key(file[0].split(".")[0]) + + # and override the method with a manual dict lookup + + # _id = file[0].split(".")[0] + # if _id in list(banks["banks"].keys()): + # key = [banks["banks"][_id], ""] else: key = None diff --git a/wwise.py b/wwise.py index 1501a08..07e4a90 100644 --- a/wwise.py +++ b/wwise.py @@ -170,6 +170,8 @@ def parse_wwise(reader): blocks_offset = 0x28 # define header to type 2, packet to modified and codebook to aoTuV603, required ? + # this somehow breaks and don't read correctly, why :c + # stream_size * 8 * sample_rate / num_samples = bitrate * 1000 metadata["numSamples"] = reader.ReadInt32(extra_offset) setup_offset = reader.ReadUInt32(extra_offset + data_offset) audio_offset = reader.ReadUInt32(extra_offset + data_offset + 0x04)