mirror of
https://github.com/Escartem/AnimeWwise.git
synced 2026-06-05 07:50:23 +08:00
some notes
This commit is contained in:
14
extract.py
14
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
|
||||
|
||||
|
||||
2
wwise.py
2
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)
|
||||
|
||||
Reference in New Issue
Block a user