| Anyone know if it's possible to extract Loom's CDDA.SOU? |
| Author
|
Thread |
 |
|
apprentice_fu
Joined: 23 Dec 2010
Posts: 3
|
OK.
I'm not really an "audio guy" and English is not my first language so please excuse me if some of my words are not correct.
I also don't know if the encoding has a proper name or not.
The audio is in stereo and 44100 Hz but only 8 bits are used for the values. But it is not 8 bit PCM.
The 16 bit values are actually bit shifted and every 13.33 ms one additional byte is used to store how many bits the left respectively the right channel are shifted. (4 bits for left and right each)
At the beginning of the file there is an offset.
md5 of my CDDA.SOU: e444985cc1aa65780d912b4fe21a6043
|
Tue Jan 11, 2011 3:45 am |
|
|
apprentice_fu
Joined: 23 Dec 2010
Posts: 3
|
As my previous post was a bit vague:
The offset at the start of the file seems to be 800 bits (or 800 + x*1177)
With stereo, 8-bit, 44100 Hz and 13.33 ms you get 1176 bytes audio data + 1 byte shifting info. The shifting info is at the start of such a
The lower four bits of the shifting info (info & 0xf) are for the right channel the higher four (info >> 4) are for the left channel.
At the beginning of the file there are some bytes (0x10 up to 0x1f) which i can't make sense of.
|
Wed Jan 12, 2011 4:32 am |
|
|
icanntspell

Joined: 18 May 2009
Posts: 72
Location: The Netherlands |
Thanks a lot, great work! I managed to build a working decoder with this info. It took me some time to realize it was encoded in signed pcm. I am not really an audio guy as well.
|
Sun Nov 13, 2011 7:50 pm |
|
|
jepael
Joined: 25 Oct 2008
Posts: 21
|
quote: Originally posted by apprentice_fu
With stereo, 8-bit, 44100 Hz and 13.33 ms you get 1176 bytes audio data + 1 byte shifting info.
The 1176 is an interesting value, as one audio CD sector contains 1176*2=2352 bytes of 16-bit stereo data. It may be that the game internally uses cd-rom sector numbers or the minute:second:frame format when it starts playing the audio. There are 75 frames (audio sectors) per second.
|
Tue Nov 15, 2011 7:35 am |
|
|
clone2727
ScummVM Team Member

Joined: 09 Jun 2006
Posts: 1414
Location: NJ, USA |
quote: Originally posted by jepael The 1176 is an interesting value, as one audio CD sector contains 1176*2=2352 bytes of 16-bit stereo data. It may be that the game internally uses cd-rom sector numbers or the minute:second:frame format when it starts playing the audio. There are 75 frames (audio sectors) per second.
Of course it references the audio data that way; they didn't actually change the SCUMM data from the CD version. In Loom's case, it specifies offset from the beginning of the disc (see scumm/script_v5.cpp:2612).
|
Tue Nov 15, 2011 1:08 pm |
|
|
|
Forum Rules:
You cannot post new topics in this forum You cannot 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
|
|
|
|
Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
|
|