Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Mon Apr 27, 2026 12:11 am
All times are UTC + 0
I made a new audio converting tool.
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
Author Message
jonwil
Rocket Cyborg


Joined: 24 Jul 2005

PostPosted: Mon Mar 09, 2026 8:44 am    Post subject:  I made a new audio converting tool. Reply with quote  Mark this post and the followings unread

I made a new tool for doing audio conversions for the later SAGE games (Command & Conquer 3 Tiberium Wars, Command & Conquer 3 Kane's Wrath, Red Alert 3, Red Alert 3 Uprising and Command & Conquer 4 Tiberian Twilight).

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 Smile

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 Smile

More tools are comming in the future including a way to extract/play sounds directly from the game data files.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1917s ][ Queries: 11 (0.0078s) ][ Debug on ]