Page 1 of 1

RSO file structure

Posted: 11 Oct 2012, 13:25
by twodotzero
Where can I find description of RSO file structure?

Re: RSO file structure

Posted: 11 Oct 2012, 14:52
by afanofosc
RSO files contain PCM or ADPCM mono samples with a default sample rate of 8k. You can look at my Pascal source code for converting from/to WAV format to/from RSO format.

http://bricxcc.svn.sourceforge.net/svnr ... RsoCvt.pas

The file starts with a short header containing 4 big-endian Words (8 bytes total). These are the format (0x0101 = adpcm, 0x0100 = pcm), the chunk size (total byes of sample data), the sample rate, and the play mode (ignored). So the file length will always be #sample bytes+8.

You can also look in the firmware source code, either as posted by LEGO or my enhanced version of that same code.

http://mindboards.svn.sourceforge.net/v ... /c_sound.c

See also the d_sound.c, d_sound.r, and d_sound_adpcm.r files for the low level details.

John Hansen

Re: RSO file structure

Posted: 12 Oct 2012, 15:28
by twodotzero
Thank you very much.