EA Command And Conquer 3 Audio Codec: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
m (+ra3 game)
No edit summary
 
(3 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/, http://www.cncnz.com/games/cnc3/demo/, http://www.cncnz.com/games/ra3/
* Company: [[Electronic Arts]]
* Samples: http://samples.mplayerhq.hu/game-formats/cc3-audio/
 
This format is found on certain .cdata files used for sound effects/voice inside the *.BIG resource files of Command & Conquer 3 and Red Alert 3. 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.
 
== File Layout ==
The file begins with a 16-byte header, which is then followed by codec specific data. All numbers are encoded in big endian. If bytes 0 and 1 are 0x0000, it means that the audio file is a streamed audio file and the actual header data is stored elsewhere in the game data. (all known streamed audio from the game uses EA Layer 3 codec)
 
 
byte  0      codec type
              2 = no compression
              4 = XAS ADPCM
              5 = EALayer3 MPEG Layer 3 audio variant
byte  1      related to channel count. Seems to be set to
              (channel count - 1) * 4 so 0 = mono, 4 = stereo,
              0xC = 4 channels and 0x14 = 5.1 (i.e. 6 channels)
bytes 2-3    sample rate
bytes 4-7    total samples
bytes 8-11  total file size (bytes)
bytes 12-16  total samples
 
== EA ADPCM XAS ==
 
XAS is a variation on the [[Electronic Arts XA]] codec that uses four independant PCM deltas.  


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.
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.
Line 34: Line 9:
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:Game Formats]]
[[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.