RSO file structure

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
twodotzero
Posts: 2
Joined: 11 Oct 2012, 13:06

RSO file structure

Post by twodotzero »

Where can I find description of RSO file structure?
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: RSO file structure

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
twodotzero
Posts: 2
Joined: 11 Oct 2012, 13:06

Re: RSO file structure

Post by twodotzero »

Thank you very much.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 4 guests