EA Command And Conquer 3 Audio Codec

From MultimediaWiki
Revision as of 01:59, 7 March 2007 by Jonwil (talk | contribs)
Jump to navigation Jump to search

This codec is found on certain .cdata files inside the *.BIG resource files of the new Command & Conquer 3 Demo.

All data in these files is little endian.

It begins with a 12 byte header.

The first 2 bytes seem to be 04 00 in all files seen so far. The next 2 are the sample rate of the audio (BB 80 aka 48000 in all files seen so far) Following that is a 4 byte count of how many samples are in the auduo file. Then comes a 4 byte count of the size in bytes of the audio data that follows the header. After that comes the 4 byte sample count repeated a second time.

The audio data that follows is broken up into 76 byte blocks with a 16 byte header and 60 bytes of sample data. The actual purpose of the header and the mechanism used to convert the header and sample data back into raw audio is unknown at this time.

The following tables are known to be used in some way in the decoding routine: Table 1:

0.0
0.9375
1.796875
1.53125
1.0

Table 2:

0.0
0.0
-0.8125
-0.859375
1.0

Table 3:

0.00000000046566129
0.00000000023283064
0.00000000011641532
0.000000000058207661
0.00000000002910383
0.000000000014551915
0.0000000000072759576
0.0000000000036379788
0.0000000000018189894
0.0000000000009094947
0.00000000000045474735
0.00000000000022737368
0.00000000000011368684
0.0
0.0