Metroid Prime AGSC by MrSinistar at 6:08 AM EDT on August 8, 2014
Hi all! Several people and myself are currently trying to figure out the Metroid Prime AGSC sound format. Looking at the sound file, there's four chunks of data: The audio header and sound table, a second chunk that I'm assuming is loop points, the third chunk is raw ADPCM data and the fourth chunk is possibly the offsets for the sounds and other unknown data.
I tried loading the files in VGMToolbox and the rendered GENH produce static results but if the sounds are mono and at 22050 hz, you can hear some of the sound effects albeit distorted. I tried using the GameCube ADP/DTK 4-bit ADPCM codec but it produces an unplayable GENH unless if I use stereo, which I know is incorrect.
If anyone feels like looking into it, all the AGSC files are contained in AudioGrp.pak, and can be dumped out using PakTool.
The files start with a directory and subdirectory name, then the four chunks of data MrSinistar mentioned. Each of those chunks begins with a 32-bit size value in bytes (not including the size value itself).
No, this is a different file format, but uses same file extension. The AGSC format that vgmstream supports is for the title screen music in Metroid Prime 2, which, IIRC, is just a DSP stream.
The AGSC files that I'm talking about show up in the first Metroid Prime, but they are a bunch of ADPCM streams in one file.
So for anyone interested, I ended up figuring out how to dump sound effects from the AGSC files from both Prime 1 and 2 yesterday. The format vgmstream supports is not a different format (at least not different from the other Prime 2 AGSCs - Prime 1 does indeed have a slightly different format), but the implementation is completely wrong - it assumes that there's only one sound in the file, when it's actually a group of sounds, and it hardcodes offsets to sound metadata that actually isn't in the same place every time; in fact, every sound in the file has its own metadata. So vgmstream's implementation only works on one file. That being said, it was useful as a reference regardless to help identify where the sound metadata was.
There's a download link to the tool I made to extract the sounds, as well as some detail on what I understand of how the format actually works, here.