Sound Format

From BFBB Wiki
Jump to: navigation, search

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[edit]

GameCube[edit]

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[edit]

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[edit]

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[edit]

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

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)[edit]

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.

Xbox[edit]

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[edit]

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.