FMOD

FMOD is an audio engine used in all Good and some Evil engine GameCube games. It uses *.fsb (FMOD Sample Bank) files to store audio data and *.fev (FMOD Event) files to control the playback of a sound (GoodEngine only). EvilEngine stores all sample banks in SNDI assets in HIP/HOP level archives, while GoodEngine stores them externally in a "media" folder. All sample banks are not encrypted and in little-endian.

Below is a table of all games and platforms which use fmod and their version.

FSB Header
0x18 (FSB3) or 0x30 (FSB4) bytes header

Sample Header
0x50 bytes sample header for first sound only in EvilEngine, and for every sound in GoodEngine.

Sample Header Basic
Only present if the FMOD_FSB_SOURCE_BASICHEADERS flag is set. Basic sample header for every consecutive sample after the first one. This is always the case in EvilEngine which means every basic sample inherits all values of the first 0x50 bytes sample header (numchannels, frequency, ...) i.e. you cannot store mono and stereo or different frequency tracks in one FSB.

Extended Header
Extended header are only present if a specific flag is set and are appended to the end of a (basic) sample header.

FMOD_GCADPCMINFO
Only present if the FSOUND_GCADPCM flag ist set. GCADPCM header for every channel (stereo has 2).

Syncpoints
Only present if the FSOUND_SYNCPOINTS flag is set.

XMA
Only present if the FSOUND_XMA flag is set. Ratatouille and Wall-E Xbox360 use XMA1, every game after that XMA2 (with a few exceptions).

Flags
Note: Only flags that occur are listed.

FSB Header Flags
0x02 = FMOD_FSB_SOURCE_BASICHEADERS  [Samples have basic headers] 0x10 = FMOD_FSB_SOURCE_NOTINTERLEAVED [Sample data is not interleaved] 0x20 = FMOD_FSB_SOURCE_MPEG_PADDED   [MPEG frames are aligned to the nearest 2 bytes, 16 bytes for multichannel] 0x40 = FMOD_FSB_SOURCE_MPEG_PADDED4  [MPEG frames are aligned to the nearest 4 bytes, 16 bytes for multichannel]

Sample Header Flags
0x00000001 = FSOUND_LOOP_OFF      [For non looping samples] 0x00000010 = FSOUND_16BITS        [For 16-bit samples] 0x00000020 = FSOUND_MONO          [For mono samples] 0x00000040 = FSOUND_STEREO        [For stereo samples] 0x00000100 = FSOUND_SIGNED        [For user created source data containing signed data] 0x00000200 = FSOUND_MPEG          [For MPEG layer 2/3 data] 0x00001000 = FSOUND_HW3D          [Attempts to make samples use 3d hardware acceleration] 0x00002000 = FSOUND_2D            [Tells software (not hardware) based sample not to be included in 3d processing] 0x00004000 = FSOUND_SYNCPOINTS_NONAMES [Specifies that syncpoints are present with no names] 0x00008000 = FSOUND_DUPLICATE     [This subsound is a duplicate of the previous one i.e. it uses the same sample data but w/different mode bits] 0x00080000 = FSOUND_HW2D          [2D hardware sounds. Allows hardware specific effects] 0x00400000 = FSOUND_IMAADPCM      [Contents are stored compressed as IMA ADPCM] 0x00100000 = FSOUND_3D            [3D software sounds] 0x01000000 = FSOUND_XMA           [For Xbox360 only - Contents are compressed as XMA format] 0x02000000 = FSOUND_GCADPCM       [For Gamecube/Wii only - Contents are compressed as Gamecube/Wii DSP-ADPCM format] 0x04000000 = FSOUND_MULTICHANNEL  [Contents are interleaved into a multi-channel (more than stereo) format] 0x10000000 = FSOUND_MPEG_LAYER3   [Data is in MP3 format] 0x20000000 = FSOUND_IMAADPCMSTEREO [Signify IMA ADPCM is actually stereo not two interleaved mono] 0x80000000 = FSOUND_SYNCPOINTS    [Specifies that syncpoints are present]