Decode WinAmp's IN_CDDA.cdb CD Database (cddb)

Updated: 2005-10-14

The IN_CDDA.cdb file is found in WinAmp's Plugins directory. It contains a local copy of the cddb CD Database for your CDs. But how do you decode the file?

File Format

Note that this is a binary file for Windows and so is little-endian, with 32-bit long words. C strings are nul-terminated.

OffsetContentsDescription
0longMagic number:
  • Value 0xDEADBEEF = version 1.0 (WinAmp 2.?)
  • Value 0xDEADBEAD = version 1.10a (WinAmp 2.?)
  • Value 0xBEEFF00D = version 2.0 (WinAmp 2.?)
  • Value 0xBEEFF00E = version 3.0 (WinAmp 5)
4long(see below)
8longsize of trailing block in bytes
OffsetContentsDescription
0C stringDisc title
xC stringArtist name
gC stringGenre [v3.0 onwards]
gC stringYear [v3.0 onwards]
iC stringCD ID (optional) 8 bytes + nul [v2.0 onwards]
ylongNumber of tracks [v1.10a onwards]
zC stringTrack name (one occurence for each track)
OffsetContentsDescription
+0longDisc ID
+4long(unknown)
+8longOffset (post header) to disc information (ie. add 12 to get file offset)

Update

Thomas Kriegel (at arcor.de) notes: the long at offset 4 is the size of the first and second part in the table (offset 0 to z)! You have to calculate it in the following way : value at offset 4 + value at offset 8 (size of trailing block in bytes) = size of file. [updated 2005/10/13]

Disc ID

The least significant byte is the number of tracks on the disc. The rest of the ID is calculated as described in discid.c

Source Code

Here's the source code: cdbx.c

Other Utilities

See also Play List Converter by Alex Yakovlev (alex__yakovlev@hotmail.com) which you can find at http://thesoftpro.tripod.com/downloads/plcvt/


Back to arb's music page