Difference between revisions of "AST file"

From WiiBrew
Jump to navigation Jump to search
Line 1: Line 1:
 
AST files contain PCM16 sound data. They're used in Super Mario Galaxy for musics, and possibly in other games.
 
AST files contain PCM16 sound data. They're used in Super Mario Galaxy for musics, and possibly in other games.
  
They contain an header followed by a BLCK chunk.
+
They contain an header followed by a BLCK chunk.<br>
All the data in those files are big-endian, except where mentioned.
+
All the data in those files are big-endian, except where mentioned.<br>
All the offsets are absolute (from begining of file), except where mentioned.
+
All the offsets are absolute (from begining of file), except where mentioned.<br>
All the sizes are in bytes, except where mentioned.
+
All the sizes are in bytes, except where mentioned.<br>
  
 
=== AST header ===
 
=== AST header ===
Line 60: Line 60:
 
=== BLCK chunk ===
 
=== BLCK chunk ===
  
The BLCK chunk directly follows the AST header. It contains a 32-byte header, followed by the PCM16 sound data.
+
The BLCK chunk directly follows the AST header. It contains a 32-byte header, followed by the PCM16 sound data.<br>
 
Here's a description of it:
 
Here's a description of it:
  

Revision as of 17:49, 21 September 2009

AST files contain PCM16 sound data. They're used in Super Mario Galaxy for musics, and possibly in other games.

They contain an header followed by a BLCK 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.

AST header

The header is 64 bytes long. Here's a description of it:

Offset Size Description
0x0000 4 "STRM" (0x5354524D)
0x0004 4 Size of the BLCK chunk
0x0008 4 Unknown (0x00010010)
0x000C 4 Unknown
0x0010 4 Sampling rate in Hz (typically 0x7D00 = 32000 Hz)
0x0014 4 ????????
0x0018 4 ????????
0x001C 4 ????????
0x0020 4 Block size? (typically 0x2760)
0x0024 28 Unknown

BLCK chunk

The BLCK chunk directly follows the AST header. It contains a 32-byte header, followed by the PCM16 sound data.
Here's a description of it:

Offset (from beginning of BLCK chunk) Size Description
0x0000 4 "BLCK" (0x424C434B)
0x0004 4 Block size? (typically 0x2760)
0x0008 24 Padding (zero)
0x0020 variable PCM16 data

WARNING: The PCM16 data is stored in BIG-ENDIAN! Don't forget to byteswap each sample you read or your sound will be pure junk!