Silvris / RingingBloom

C#-based set of tools for WWise audio editing (generally for Capcom games).
50 stars 9 forks source link

Replace function on WEMs in BNKs not properly removing any extra sections of the file if new WEM is smaller than previous file #10

Open DannyDan4 opened 6 months ago

DannyDan4 commented 6 months ago

In RE8 mode or MHRise mode, BNKs will not be properly shortened if you replace a WEM with a new, smaller file. All values are properly updated, but any remaining size is just left as junk data at the end of the file, causing malfunctions.

Solution to fix: Open .bnk in a hex editor, locate the last bits of the old file, and remove everything that comes after them, if you're messing with a sound that is not the last one on the file.

DannyDan4 commented 6 months ago

So, bad news, after I had figured out how to correct the extra data at the end of the file using a hex editor, fixing this problem, of which I could not get to stop happening, I CAN NOW NO LONGER RECREATE THE ISSUE, REPLACING WEMS NOW WORKS FLAWLESSLY.

DannyDan4 commented 6 months ago

Okay, I got the bug to occur again, however, all the same, I cannot determine what is causing the problem, just what is occurring.

Steps I used to reproduce: replace a sound in a .bnk, in RE8 mode, with a sound that is smaller in filesize than the original sound in the file, and hope the bug actually occurs, as it doesn't seem to be consistent.