EvilEngine/Sound Format

This page contains information on how sounds and music are stored in the games.

Sounds are usually contained in SND and SNDS assets, with the SNDI asset containing information about them. Each HOP file (sometimes the HIP) contains multiple SND and SNDS assets and one single SNDI asset. There doesn't seem to be an internal difference between SND and SNDS other than being stored as different assets; sound effects are usually in SND and voice lines and music (stored in mnu5.HIP in BFBB) are usually in SNDS.

GameCube
In Scooby-Doo: Night of 100 Frights and Spongebob Squarepants: Battle For Bikini Bottom, SND and SNDS are a GameCube DSP audio file stripped of its 0x60 byte header: all of a level's sound headers are kept separate in the single SNDI asset.

In The Spongebob Squarepants Movie Game, The Incredibles and Rise of the Underminer, the SND and SNDS assets are empty, and instead, all of the sounds are contained entirely in the SNDI asset.

Xbox
The audio format on the Xbox version of all 5 games is either raw IMA ADPCM, or raw 16-bit Linear PCM stripped of its *.wav header: all of a level's sound headers are kept separate in the single SNDI asset.

Playstation 2
The audio format on the PS2 version of all 5 games is a PS2 VAG sound file stripped of its 0x30 byte header: all of a level's sound headers are kept separate in the single SNDI asset.

GameCube (Night of 100 Frights/Battle For Bikini Bottom)
The SNDI has a 0xC or 0x10 byte header:

After that, there are three consecutive arrays of SNDI entries: one for the SND, one for the SNDS and one for the cutscene SNDS. Each SNDI entry is 0x64 bytes long and follows this structure:

GameCube (The SpongeBob SquarePants Movie - Ratatouille Prototype)
In those games, the SNDI contains not only the sound headers but also the entirety of the sound files themselves.

SNDI Header
The SNDI itself has a 0x20 byte header:

All sounds are contained inside FSB3 files. Each FSB3 can contain one or multiple sounds; in all files analyzed so far, most of the sounds are contained in the first FSB3 file, with each subsequent file containing only one. This is the structure of a FSB3 file:

FSB3 Header
This is the header of a FSB3 file. There is one per FSB3 in the SNDI.

After the FSB3 header, there is one sample header.

Sample Header
This is the header of a FSB3 sample. There is one per FSB3 in the SNDI, immediately after the FSB3 header above.

Sound Header
After the sample header, there are sound headers. This header repeats numSamples times (one for each sound). This header is 0x36 bytes long, an unusual length since it's not aligned to 4 bytes.

Adding the lengthCompressedBytes in each Sound Header entry will result in the totalDataSize value of the FSB3 header.

Sound Data
After numSamples occurrences of the Sound Header, we have the compressed sound data. The total length of this is set in the FSB3 Header (totalDataSize), with each sound in order.

After the sound data for the entire FSB3 file ends, we usually have the next FSB3 file, or if it's the last one, then we've reached the Footer section.

Footer Section
This is a section which occurs at the end of the file. The offset to this is set in the SNDI header. This is its structure:

After this, we have nWavFiles times the following structure, which refers to each sound in the SNDI:

Xbox
The SNDI has a 0xC byte header:

After that, there are three consecutive arrays of SNDI entries: one for the SND, one for the SNDS and one for the cutscene SNDS. Each SNDI entry is 0x2C bytes long and follows this structure:

Playstation 2
The SNDI has a 0x8 byte header:

After that, there are two consecutive arrays of SNDI entries: one for the SND and one for the SNDS. Each SNDI entry is 0x30 bytes long and is a VAG header. The reserved space at 0x8 in the header contains the sound's Asset ID.