Skip to main content
Topic: EA ADPCM (Read 361 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

EA ADPCM

I wouldn't expect anyone here to really know, but how different from eachother are the EA XAS v1 ADPCM and the EA XA v2 ADPCM? I've trying to encode a XAS v1 file and I haven't had much luck thus far. I've tried messing about in a HEX editor but changing the headers just results in a distorted garbled mess.

Re: EA ADPCM

Reply #1
The XAS and XA formats are not the same. The S makes a big difference.

EA XAS v1 is a compressed stream with a frame size of 128 that closer resembles BRR.
EA XA v1 is a compressed stream with a frame size of 30 and an offset of 128 prior to downshift.
EA XA v2 has variable frame size because it can contain raw PCM (big endian). It can also subinterleave stereo samples in high-low 4 bits.

You can check out the vgmstream source files to see how they're decoded.

Re: EA ADPCM

Reply #2
The XAS and XA formats are not the same. The S makes a big difference.

EA XAS v1 is a compressed stream with a frame size of 128 that closer resembles BRR.
EA XA v1 is a compressed stream with a frame size of 30 and an offset of 128 prior to downshift.
EA XA v2 has variable frame size because it can contain raw PCM (big endian). It can also subinterleave stereo samples in high-low 4 bits.

You can check out the vgmstream source files to see how they're decoded.
Do you know of any encoders for XAS v1? The game I'm modding (Sims 3) can decode XA V2, as it is used for the game's intro videos and TV clips. I'm just not sure whether it's possible to get the game to read this codec in other places as all of the other sound effects are SNR files.

 

Re: EA ADPCM

Reply #3
It's been a one-way street of extraction-only partly because the codecs are pretty obscure and the container format is proprietary that the attempts to fully reverse engineer it have been with end users, with limited results. There are Sims modding tools that deal with SNR files, but it looks like they make use of a more popular format when changing sounds such as MP3.

EDIT: Mp3 is just a format that the EALayer3 tool takes (what Sims 3 uses for music). Whatever format it makes, the game may stutter or crash when even reconverting the originals back to SNR form.

Re: EA ADPCM

Reply #4
It's been a one-way street of extraction-only partly because the codecs are pretty obscure and the container format is proprietary that the attempts to fully reverse engineer it have been with end users, with limited results. There are Sims modding tools that deal with SNR files, but it looks like they make use of a more popular format when changing sounds such as MP3.

EDIT: Mp3 is just a format that the EALayer3 tool takes (what Sims 3 uses for music). Whatever format it makes, the game may stutter or crash when even reconverting the originals back to SNR form.
So having the decoders and info about them out there wouldn't make the task of building an encoder less difficult? I know next to nothing about programming, so excuse my ignorance.

Using the ealayer3 tool I've managed to replace the game's music and it seems to be stable for the most part, but it ends there. Any attempt at replacing sound effects or stings (some of which still use mp3) crashes the game constantly. Part of me thought that if I could somehow get my hands on an ADPCM encoder it might help somewhat, as clearly the game wasn't designed to be constantly decoding tens of mp3s at once. Alas, if I'm at a dead end, then this might be the only way forward. Much thanks for the advice!

Re: EA ADPCM

Reply #5
And crashing is another reason why encoders wouldn't be added to audio conversion libraries. Making the encoders is the easy part. Getting the new files to work is the hard part. I could write the codecs myself, but the results will probably still crash because I don't know the file structure.

Re: EA ADPCM

Reply #6
And crashing is another reason why encoders wouldn't be added to audio conversion libraries. Making the encoders is the easy part. Getting the new files to work is the hard part. I could write the codecs myself, but the results will probably still crash because I don't know the file structure.
There is one way to ensure that a custom MP3 is fully stable (and without popping/chirping), but this usually breaks looping/replay-ability. This is the method that the game's audio files follow themselves, so one would expect it to work. For each MP3 sound, there is an SNR that contains the header information, and then an SNS which contains the actual audio stream. The SNR is truncated to only contain header info and the SNS is modified to contain certain blocks of code, but I'm not really sure anyone truly knows what they do.

 
SimplePortal 1.0.0 RC1 © 2008-2020