Difference between revisions of "EA Command And Conquer 3 Audio Codec"

From MultimediaWiki
Jump to navigation Jump to search
(link simplification)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* Extension: .cdata
EA XAS is a variation on the [[Electronic Arts XA]] codec that uses four independent PCM deltas and is used for audio in the PC/Mac versions of Command & Conquer 3, Red Alert 3 and Command & Conquer 4 as well as the Playstation 3 version of Red Alert 3. The XBOX 360 versions of these games use the Microsoft XMA ADPCM codec.
* Website: [http://www.cncnz.com/games/cnc3/demo/ http://www.cncnz.com/games/cnc3/demo/]
* Company: [[Electronic Arts]]
* Samples: http://samples.mplayerhq.hu/game-formats/cc3-audio/


This codec is found on certain .cdata files inside the *.BIG resource files of the new Command & Conquer 3 Demo. Using a program such as [http://www.ppmsite.com/ OS Big Editor 0.4] you can open the DemoStreams.big file from the C&C3 Demo and extract any .cdata file from the "data\global_demo_common\cdata" folder that starts with 04 00 and it should be one of the audio files compressed with this codec.
Compressed audio data is arranged in 76-byte blocks that follow sequentially after the header. Each block corresponds to 128 audio samples. In files with stereo audio, the blocks alternate between left and right channels. For example, the first block is for the first channel, the next is for the second channel and so on.


All data in these files is little endian.
Each block beings with a 16-byte header, and is followed by 15 x 4-byte compressed audio blobs.


It begins with a 12 byte header.
== Notes ==
 
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 audio 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


Thanks to KMX at Derelict Studios for finding out the initial information on this format as it applies to C&C3.
Thanks to KMX at Derelict Studios for finding out the initial information on this format as it applies to C&C3.


[[Category:Undiscovered Audio Codecs]]
[[Category:Audio Codecs]]
[[Category:Audio Codecs]]

Latest revision as of 18:12, 26 August 2010

EA XAS is a variation on the Electronic Arts XA codec that uses four independent PCM deltas and is used for audio in the PC/Mac versions of Command & Conquer 3, Red Alert 3 and Command & Conquer 4 as well as the Playstation 3 version of Red Alert 3. The XBOX 360 versions of these games use the Microsoft XMA ADPCM codec.

Compressed audio data is arranged in 76-byte blocks that follow sequentially after the header. Each block corresponds to 128 audio samples. In files with stereo audio, the blocks alternate between left and right channels. For example, the first block is for the first channel, the next is for the second channel and so on.

Each block beings with a 16-byte header, and is followed by 15 x 4-byte compressed audio blobs.

Notes

Thanks to KMX at Derelict Studios for finding out the initial information on this format as it applies to C&C3.