ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.comDotEmu  Rules - Search - Register - Login curved edge
Folder Forum Index > General Discussion > Anyone know if it's possible to extract Loom's CDDA.SOU? Goto page Previous  1, 2, 3  Next
Anyone know if it's possible to extract Loom's CDDA.SOU?
  Author    Thread Reply to topic
apprentice_fu



Joined: 23 Dec 2010
Posts: 7
Location: Germany
 

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

 Reply with quote  
Post Tue Jan 11, 2011 3:45 am 
 View user's profile Send private message
apprentice_fu



Joined: 23 Dec 2010
Posts: 7
Location: Germany
 

As my previous post was a bit vague:

The offset at the start of the file seems to be 800 bytes (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.

(edit corrected bits to bytes)


Last edited by apprentice_fu on Sun Feb 02, 2014 6:37 pm; edited 1 time in total

 Reply with quote  
Post Wed Jan 12, 2011 4:32 am 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 80
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.

 Reply with quote  
Post Sun Nov 13, 2011 7:50 pm 
 View user's profile Send private message Visit poster's website
jepael



Joined: 25 Oct 2008
Posts: 23
 

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.
 Reply with quote  
Post Tue Nov 15, 2011 7:35 am 
 View user's profile Send private message
clone2727
ScummVM Team Member


Joined: 09 Jun 2006
Posts: 1522
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).
 Reply with quote  
Post Tue Nov 15, 2011 1:08 pm 
 View user's profile Send private message
dtungsten



Joined: 03 Feb 2014
Posts: 1
 

quote:
Originally posted by icanntspell
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.


I managed to build a working decoder too, thanks!
 Reply with quote  
Post Tue Feb 04, 2014 10:38 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2, 3  Next


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
curved edge   curved edge