BRSTM files contain ADPCM sound data. They're used in Mario Kart Wii for musics, and possibly in other games.
They contain an header, followed by a HEAD chunk, a ADPC chunk and a DATA chunk.
All the data in those files are big-endian, except where mentioned.
All the offsets are absolute (from begining of file), except where mentioned.
All the sizes are in bytes, except where mentioned.
The header is 64 bytes long.
|0x0008||4||Size of the whole file|
|0x0010||4||Offset to HEAD chunk|
|0x0014||4||Size of HEAD chunk|
|0x0018||4||Offset to ADPC chunk|
|0x001C||4||Size of ADPC chunk|
|0x0020||4||Offset to DATA chunk|
|0x0024||4||Size of DATA chunk|
The head chunk is typically 256 bytes long.
It contains what looks like the ADPCM table and YN1/YN2, twice, probably once for the first part
and once for the last (looping) part.
It also contains some other unknown stuff.
The ADPC chunk is typically 1216 bytes long. It seems to contain some other ADPCM table.
The DATA chunk contains ADPCM sound data.