EvilEngine/Sound Format

Revision as of 04:15, 14 April 2019 by Battlepedia>Igorseabra4 (→‎SNDI 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 are usually in SNDS.

SND/SNDS Format

SND/SNDS
Sound/Streaming Sound
TypeBinary
Games usedThe Incredibles

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.

SNDI Format

SNDI
Sound Info
TypeBinary
Games usedThe Incredibles

GameCube (Night of 100 Frights/Battle For Bikini Bottom)

The SNDI has a 0xC or 0x10 byte header:

Offset Type Variable Description
0x00 int amount of SND Amound of headers for SND assets.
0x04 byte[4] null Padding
0x08 int amount of SNDS Amound of headers for SNDS assets.
0x0C int amount of cutscene SNDS Amound of headers for SNDS assets used in cutscenes. BFBB only.

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:

Offset Type Variable Description
0x00 byte[0x60] Sound Header Header of GameCube DSP sound file.
0x60 AssetID Sound Asset ID Asset ID of corresponding SND or SNDS asset.

GameCube (Movie Game/Incredibles/Rise of the Underminer)

In those games, the SNDI contains not only the sound headers but also the entirety of the sound files themselves. It has a 0x20 byte header:

Offset Type Variable Description
0x00 AssetID this Asset ID of this asset
0x04 uint ? Offset relative to end of this header to a section which has a few unknown ints then the asset ID of each sound in the SNDI.
0x08 byte[0x10] ? Usually all 0s
0x18 short amount of sounds Amound of sounds in SNDI
0x1A short ? Amound of sounds in SNDI - amount of unknown ints at last section (value at 0x18 - value at 0x1C)
0x1C short ? Amount of unknown ints at last section
0x1E short ? ?

Xbox

The SNDI has a 0xC byte header:

Offset Type Variable Description
0x00 int amount of SND Amound of headers for SND assets.
0x04 int amount of SNDS Amound of headers for SNDS assets.
0x08 int amount of cutscene SNDS Amound of headers for SNDS assets used in cutscenes.

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:

Offset Type Variable Description
0x00 short fmtId 0x0069 if Xbox ADPCM, 0x0001 if Linear PCM.
0x02 short fmtChannels Number of audio Channels.
0x04 int fmtSampleRate Sampling rate. Xbox ADPCM data plays at this rate multipled by 65/64.
0x08 int fmtBytesPerSecond Used as an estimate for bytes per second. Can be ignored.
0x0C short fmtBlockAlignment Block Size. 0x0024 for Xbox ADPCM data.
0x0E short fmtBitsPerSample Number of bits used per sample. 0x0004 if Xbox ADPCM, 0x0000 if Linear PCM.
0x10 short fmtExtBytes Will always be 0x0002 if Xbox ADPCM. 0x0000 if Linear PCM.
0x12 short fmtExtData ADPCM nibbles per block. Normally 0x0040 if Xbox APCM. 0x0000 if Linear PCM.
0x14 int dataSize Size of the corresponding SND or SNDS asset.
0x18 AssetID Sound Asset ID Asset ID of corresponding SND or SNDS asset.
0x1C byte[16] Padding


Playstation 2

The SNDI has a 0x8 byte header:

Offset Type Variable Description
0x00 int amount of SND Amound of headers for SND assets.
0x08 int amount of SNDS Amound of headers for SNDS assets.

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.