You can download it from https://mega.nz/file/L9FVyJrD#kwc8vTdjaXCUta74WmzwjXvS25bPUV72NpK0qJhbQjY and you can get the source code at https://github.com/jonwil/sagetools
It takes the following parameters:
-in (path to the input audio file to convert)
-out (path to the output audio file to create)
-sndplayer (output EA soundplayer format)
-sndstream (output EA sound generic stream)
-wave (output WAV format)
-s16l_int (output signed 16 bit little endian interleaved)
-s16b_int (output signed 16 bit big endian interleaved)
-eaxa_blk (output EA-XA block)
-u8_int (output unsigned 8 bit interleaved)
-xas_int (output XAS ADPCM)
-ealayer3_int (output EALayer3 version 1)
-ealayer32pcm_int (output EALayer3 version 2 PCM)
-ealayer32spike_int (output EALayer3 version 2 Spike)
-vbr (compression quality for EALayer3, 0 to 100)
-playloc (play location, either ram or stream)
-rs (samplerate to resample to)
For example, this command line:
sndconvert -in in.wav -out out -sndplayer -ealayer3_int -playloc stream -vbr 100 -rs 44100
will convert in.wav into an output sndplayer file with codec EALayer3 version 1, play location streamed, quality 100 and samplerate 44100.
It supports the following formats:
EA Sndplayer with codecs XAS ADPCM, EALayer3 version 1, EALayer3 version 2 PCM, EALayer3 version 2 Spike and Signed 16 bit big endian interleaved (this is the format used for most audio in the game, i.e. what gets packed into the game data by BinaryAssetBuilder, its also the format used inside the PathMusic data)
EA sound generic stream with codec EA-XA block (this is the format used for the .snd files that go with the movies)
wav with codecs signed 24 bit little endian interleaved (input only), unsigned 8 bit interleaved and signed 16 bit little endian interleaved (I am sure you all know what a .wav file is)
The purpose of this tool is to provide a way to do encoding and decoding of the audio formats needed in the SAGE games as well as providing a library that can be used for other tools I intend to write later and to provide code that explains how all this works (and for other people who want to work with this stuff to use)
Feel free to modify the source code and to distribute your modifications but if you distribute modified binaries you also need to distribute modified source code to comply with the various licenses and I would appreciate a heads up that you are doing things with my code
Any questions about this stuff or how to use it (e.g. if the instructions aren't clear), please feel free to post here or hit me up on Discord (I am "Jonathan Wilson" on most of the C&C/SAGE/modding discords)
If you want to know more about how this works internally, read the source code (or ask me questions on Discord
More tools are comming in the future including a way to extract/play sounds directly from the game data files.



