Dsp Files

Dsp Files

The .dsp format is a common GameCube/Wii format for audio that comes with the SDK. It encodes sound using Nintendo's ADPCM codec. The same ADPCM codec is also embedded into several Retro Studios format, like AGSC; the CSMP format actually embeds the entire DSP format within it.

W 3.5 Loader Manual for 16-Bit Processors Revision 1.0, October 2003 Part Number 82-000035-04 Analog Devices, Inc. One Technology Way Norwood, Mass. DSP is short for Digital Sound Processing. DSP plugins can modify the audio and common DSP plugins are limiters, plugins that add reverb and volume normalization plugins to name just a few. SAM Party DJ, SAM Broadcaster and SOS can use DSP plugins to manipulate the audio which have full support for Winamp DSP plugins and makes it easy to use.


FilesSd2snes dsp filesDsp Files
To do:
An explanation of how ADPCM works would be nice to have somewhere on this page. Also, a better text explanation for the decoding process to go along with the example code.
  • 2ADPCM Data

Header

Dsp Files

Offset Type Size Description
0x0 u32 4Sample count
0x4 u32 4ADPCM nibble count; includes frame headers
0x8 u32 4Sample rate
0xC u16 2Loop flag; 1 means looped, 0 means not looped
0xE u16 2Format; always 0
0x10 u32 4Loop start offset
0x14 u32 4Loop end offset
0x18 u32 4Current address; always 0
0x1C s16[16] 2 × 16Decode coefficients; this is 8 pairs of signed 16-bit values
0x3C u16 2Gain; always 0
0x3E u16 2Initial predictor/scale; always matches first frame header
0x40 s16 2Initial sample history 1
0x42 s16 2Initial sample history 2
0x44 u16 2Loop context predictor/scale
0x46 s16 2Loop context sample history 1
0x48 s16 2Loop context sample history 2
0x4A u16[11] 2 × 11Reserved
0x60End of DSP header

ADPCM Data

The ADPCM audio data is split up into multiple frames. Each frame is 8 bytes; it starts with a one-byte header, then has 7 bytes (or 14 samples) of audio data. For each frame header, the bottom 4 bits are the scale value, and the top 4 bits are the coefficient index to use for the current frame.

Example C Decoding Function

vgmstream used as reference:

Gamecube Dsp Files

Retrieved from 'http://www.metroid2002.com/retromodding/index.php?title=DSP_(File_Format)&oldid=716'