1
0
mirror of https://github.com/Escartem/AnimeWwise.git synced 2026-06-06 00:10:24 +08:00

some notes

This commit is contained in:
Escartem
2025-01-13 14:48:04 +01:00
parent 7ef4dea067
commit 046a1f949f
2 changed files with 16 additions and 0 deletions

View File

@@ -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

View File

@@ -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)