ITT: I subtly request support for a new (?) format by valiant at 1:31 AM EST on January 15, 2009
Eurocom's MUSX, that is.
It seems there are three slightly different versions of the format, one for each last-gen console. I uploaded an archive with the NGC, PS2 and Xbox versions of the same track.
The PS2 MUSX is already supported, but the other two won't play. I'm only interested in the Xbox version as it seems to have a better quality than the other two files (higher sampling rate maybe?). Would be nice to see it supported in a future revision if it doesn't differ too much from the PS2 MUSX.
Replaced the original MediaFire link. It now includes new files detailed below.
Also, I recognized some problems with the PS2 MUSX, such as (volume-caused?) clipping and non-working loops.
...and now, I think something else could cause the looping problem. All of the music files (along with other game files) are packed into a big Filelist.000 file. The NGC and Xbox versions of the game have a neat Filelist.txt on the disc that details all the offsets (octal) and file lengths (decimal). The PS2 version doesn't have the TXT.
I just extracted some more NGC files and saw that the length is not exactly the data between two MUSX headers in the Filelist.000 but a little less, leaving a few bytes of unknown/garbage data until the next MUSX header. I don't know if this is part of the file, but I guess not - why should they write down the wrong length?
However, I included the alternate versions of the files with unknown/garbage data in the archive (the ones with the "_plusgarbage" suffix). There are no non-garbage data PS2 files in the archive, for lack of a PS2 Filelist.txt - it's the actual data between two MUSX headers. It could be that this is the cause for the non-working loops.
0e: Should loop, but doesn't. Listen to the end.
01: Should perhaps loop (in the game it simply restarts from 0:00) - also, no Xbox version with garbage here, the length in the Filelist.txt is equivalent to the data between the two MUSX headers.
02: Noticeable clicks from 0:05 onwards. Same problem occurs in one or two battle tracks that are also very loud.
08: No problem here - just a sample loop file that works perfect - making the thing with the unknown/garbage data even more ambiguous (or does the data beyond the loop end simply not matter to vgmstream?).
Does the PS2 MUSX have the same header? The file size description seems to be off a litte, it's bigger than the whole file (if you start from 0x1000 in the MUSX file, it goes well beyond the next few MUSX headers in the Filelist.000).
Your "Index-Table" will round the value up to a valid LBA size i think, means dividable by 0x800 (2048 bytes)
The MUSX header holds the correct size of the BGM data included in the MUSX file..
MUSX Header Description (always 4 byte entries): 0x00 - "MUSX" 0x04 - not sure 0x08 - Version Byte 0x0C - Exact MUSX Size (including the header) 0x10 - string like "PS2_" or "XB__", vgmstream determines the decoder with this
the rest is different between the MUSX versions... hope it helps a bit
The different placement (0x1C) of the file size descriptor in the NGC MUSX header is what initially confused me.
Still, not getting better from here on out. Look at the position in Filelist.000 where 02_ps2 starts.
EDIT: I checked some more files. It seems that for most of them, the file size in the descriptor goes beyond the limit, for some of them, it stays within the current file (this one, for example).