Support building USM with different HCA audio sample rates#16
Closed
Mikewando wants to merge 105 commits into
Closed
Support building USM with different HCA audio sample rates#16Mikewando wants to merge 105 commits into
Mikewando wants to merge 105 commits into
Conversation
Also added many chunk types for USM format.
Base ACB/AWB extraction but with no support for subkeys yet.
And a lot more in USM's, as well as other fixes.
Update 0.1.0 of PyCriCodecs.
Also Update TODO.
And other WIP's as well.
In Python 3.11 IntFlag acts weirdly and so I reverted it back to an Enum.
Fix for the latest issue.
Perhaps not a full fix yet.
A bug occurs sometimes for when not accounting for UTF padding bytes in the TOC size estimation. Possibly might break other CPK's, but not sure for now.
Overhauled the ADX decoder and encoder to entirely be in C++. Added a lot of features to the ADX decoder and encoder, it now supports any bit depths and blocksizes within the limits. Removed one feature, which is controlling the DataOffset when encoding an ADX, as it's usually not needed.
Minor AWB fix, could be a breaking change for certain cases, unclear at the moment, tested it on the AWB samples that I have and it seems to be working.
Fixed the ADX API usage in the USM file, however it is not tested, it should work as long as the input is valid. Which is now limited to wav and not pure ADX as it used to be, this will be fixed in a planned overhaul.
PCM module used to segfaults after 0.4.4 because the added destructor missed a case when the buffer is loaded directly instead from a file or converted.
Added set HCA quality parameter, not advised to use, since from `Low` and below the audio may break up.
HCA encoding had an error on two occasions, one was with last trailing frames where the bit writer might segfault. And the other was in calculating initial values where I wrongly ported the code from VGAudio.
As well as `-O3`, but setuptools already adds "-O" in gcc/clang (and /O2 in cl/msvc), so I am not sure which overrides which.
The offsets were swapped on the loop write function, fixed the order, also fixed the values written on these offsets to be the proper ones (tested lazily).
USMs can have multiple HCA tracks each with different sample rates (for example the lunar silver star remastered opening cutscene has japanese audio at 22.05KHz and english audio at 48KHz). These changes add support for building USMs that will play with these conditions.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
USMs can have multiple HCA tracks each with different sample rates (for example the lunar silver star remastered opening cutscene has japanese audio at 22.05KHz and english audio at 48KHz). These changes add support for building USMs that will play with these conditions.