AST (File Format)

From Wexos's Wiki
Jump to navigationJump to search

AST files are sound files used in some GameCube and Wii games such as Super Mario Galaxy, Super Mario Galaxy 2 and Mario Kart: Double Dash!!. The file contains a header followed by blocks with data.

File Format

Header

The file starts with a 0x40 bytes long header as follows:

Offset Type Description
0x00 Char[4] File magic. Always STRM in ASCII.
0x04 UInt32 Size of all sound blocks in bytes.
0x08 UInt16 Audio format. 0 = AFC ADPCM, 1 = PCM16.
0x0A UInt16 Bits per sample.
0x0C UInt16 Number of channels.
0x0E Int16 Loop flag. -1 if it loops, 0 if it doesn't.
0x10 UInt32 Sample rate.
0x14 UInt32 Total number of samples.
0x18 UInt32 Loop start in samples.
0x1C UInt32 Loop end in samples.
0x20 UInt32 Seems to be the block size of the first block.
0x24 UInt32 Unknown. Only seen as 0.
0x28 Byte Volume. Values range from 0 to 127.
0x29 Byte[3] Padding.
0x2C Byte[0x14] Unknown. Only seen as 0. Probably padding.

BLCK

A file contains many BLCK sections which contain sound data. Each block has the following structure:

Offset Type Description
0x00 Char[4] Block magic. Always BLCK in ASCII.
0x04 UInt32 Sound data size per channel in bytes.
0x08 UInt32 Unknown, only set when audio format is ADPCM.
0x0C UInt32 Unknown, only set when audio format is ADPCM.
0x10 Byte[0x10] Unknown. Probably padding to align sound data.
0x20 Byte[][] Sound data.

Tools

The following tools can handle AST files: