Youjose / PyCriCodecs

Python frontend with a C++ backend for managing Criware formats.
60 stars 7 forks source link

Extracted HCA from USM can't be decoded #2

Closed Timo654 closed 1 year ago

Timo654 commented 1 year ago

When trying to decode a HCA I extracted from an USM (Lost Judgment opening), the audio file can't be decoded: ValueError: Header decoding error, the header is not a valic HCA header. I also tried playing the audio file in foobar2000 with vgmstream plugin, it resulted in silence. However, when extracting the USM with VGMToolbox, the resulting HCA was smaller and played properly in foobar2000. PyCriCodecs still couldn't decode it, however.

I noticed the header for both HCAs is the same, the differences happen later on. I attached the two audio files I tested with. files.zip

Youjose commented 1 year ago

Thanks for reporting in,

And okay, I will check those out, much like the other issue, seems my extractor somehow appended two files/SFA chunks together, perhaps these USM's are missing channel number info? This shouldn't happen really but I might change the extraction method if so. Downloading the game now to check the USM's.

The HCA's and the ADX's you uploaded are somehow disjointed, the ADX's are two attached together that seems to have the same channel number, and the HCA seems to be a disjointed HCA header at first and then the actual HCA header along the file, I will check the USM's in depth after downloading the game to check on the USM files and will reply as soon as this is resolved.

Timo654 commented 1 year ago

Thanks! Also, just so you know, the PC version stores videos in a renamed cpk (they renamed movie.cpk to movie.par, even though its not a par file.)