Also had to fix a few of the audacious files to get them to compile, mainly not using NULL in the input plugin constructor and casting the STREAMFILE functions (maybe some *nix compilers would've accepted those, but FreeBSD 12's Clang did not)
Needed to change how version.h was included to let it pick up the one from CMake's build location.
NOTE: Does not build with MinGW-w64 currently, does not have a way to build the audacious or XMPlay plugins.
- Only test keys when file is encrypted
- Add clHCA_TestBlock to test a frame with the current key
- Move some key detection code to hca_decoder.c and simplify hca.c
detection
- Decrease number of test frames due to increased accuracy of
clHCA_TestBlock
- rename clHCA_DecodeSamples16 to clHCA_ReadSamples16 since it isn't
really decoding
- divide clHCA_Decode into clHCA_DecodeHeader and clHCA_DecodeBlock to
clarify usage
- unify clHCA_IsOurFile0/1 since one would need to call
clHCA_DecodeHeader right after it anyway
- add clHCA_SetKey for easier key handling
- adapt vgmstream wrapper
- Removed some overdone optimizations for clarity (don't seem to save
any substantial time when decoding +150 files)
- Remove unnecessary structs
- Treat keycode as a single 64b value
- Lib info and other tweaks
- Properly identify variables/functions/etc, all thanks to
Thealexbarney's excellent decoder analysis in VGAudio
- Simplify code to standard C, rather than asm-style decompilation
- Rename/tweak functions to be more C-like
- Minor fixes (pointer tests, incorrect values, etc)
- All was carefully tested, decoded files should be byte-identical to
previous versions