Jump to navigation Jump to search
294 bytes added ,  01:05, 6 December 2019
Fixed mix-up of N' and N in description of file
AST files contain PCM16 (16-bit signed) sound data. They're used in Super Mario Galaxy for musics, Legend of Zelda: Twilight Princess, and possibly in other games.
They contain an a header, followed by BLCK chunks which are divided in blocks(channels).<br>
All the data in those files are big-endian, except where mentioned.<br>
All the offsets are absolute (from begining beginning of the file), except where mentioned.<br>
All the sizes are in bytes, except where mentioned.<br>
| 0x000C
| 2
| Number of blocks per BLCK chunkchannels (typically 2 = stereo)
| 0x000E
| 0x0010
| 4
| Sampling rate in Hz (typically 0x7D00 = 32000 Hz)
| 0x0014
| 4
| UnknownTotal number of samples
| 0x0018
| 4
| Loopstart position in samples, from beginning of BLCK chunk/bytes?
| 0x001C
| 0x0024
| 28
| Unknown(Usually all zeros except 0x0028, which is 0x7F)
The data is divided into blocks. The number of blocks is defined by entry 0x000C in AST headerThere's one block per channel.<br>
The length of each block is defined by entry 0x0004 in BLCK chunk header.<br>
WARNING: The PCM16 data is stored in BIG-ENDIAN! If you aren't working on the Wii, don't forget to byteswap each sample you read or your sound will be pure junk!<br>
Note: there's sound data for one channel only=== Block mapping inside BLCK chunks === {| class="wikitable"|-! Number of channels! Type! Block mapping|-| 2| Stereo| Left; Right|-| 4| 4. 0 Surround| Left; Right; Surround left; Surround right|} Stereo mixing is performed by the Wii's DSPmost common type. Some music in SMG, such as the beach theme, are 4.0 Surround, though.
=== AST file structure ===
- N ' is the number of blocks per BLCK chunk channels (entry 0x000C in AST header)<br>- N' is the block size (entry 0x0004 in BLCK chunk header)<br>[[Category:File formats]]


Navigation menu