Open Sewer56 opened 2 years ago
- Removed
LoopCount
. It's a simple flag that only accepts a value of 1. Any other value is ignored.- First
short
of the Loop structure is ignored by the application. Probably reserved. Marked as such.
Sonic Riders might not use these values, but that doesn't mean they're not part of the ADX format or that no other applications use them
uint32 SampleRate;
This value is actually used as a signed value
This value is actually used as a signed value
I didn't even notice I made this change when submitting the PR, seems that you are indeed correct, I doublechecked the parsing code, that is my mistake.
Regarding the rest, do you know any sample files or games that might interpret these values otherwise? The implementation in the Windows application I was looking up doesn't even read the short in question and it was pretty late in the lifespan of the original CRI Tools; so I can't imagine that stuff might have changed between different platforms.
Regarding the rest, do you know any sample files or games that might interpret these values otherwise?
I couldn't name any games that use multiple loops, but it was part of whatever spec CRI had for ADX. They did remove support for more than a single loop at some point, but I don't know when.
Summary
Made a number of small changes to the ADX template.
These are based off my personal disassembly of the Windows port of Sonic Riders, a 2006 hoverboard racing game that uses CRI. These changes are based on my disassembly of the header parsing code.
LoopCount
. It's a simple flag that only accepts a value of 1. Any other value is ignored.short
of the Loop structure is ignored by the application. Probably reserved. Marked as such.I made this changes while working on ADX-ID3, a fun weekend project to add ID3 tag support to ADX.
Regarding AINF
I noticed the template had a mention of the 'AINF' and 'CINF' structures. While I couldn't find any test files using those headers (I've tried a fair bit), I did find the code that parses it while investigating the loop stuff.
It appears the logic is the following.
Game code specifically uses
32
and20
. There isn't anything to compensate for the channels and the official CRI encoding tools never supported>2 ch
for ADX as far as I'm aware.It comes after the
Loop
structure if the enable flag is set, and in place of the loop structure if the flag is not set.No sample files to doublecheck, so didn't add that part in.