[an error occurred while processing this directive]
Technical question about sound entries - http://www.doomworld.com Forums


Original message

loser

.
209.161.237.56

"Technical question about sound entries" , posted Fri 2 Mar 11:49user profileedit/delete messagepost reply


A sound entry in a WAD file seems to have the following header:

2 bytes: $0003
2 bytes: Sample rate
2 bytes: Data length
2 bytes: (??? bytes per sample - 1 ???)

followed by the sound data.

Does anyone know whether the '3' at the beginning is a signature (so that's how we can tell that this is a sound entry), or does it mean something? What about the last one?

This is all just guesswork. I'm suspecting there's a WAD file description document out there. Is there?

 


Replies:

Tarin

tarin@paci-fist.net
51369184
217.2.151.146

"Re(1):Technical question about sound entries" , posted Fri 2 Mar 16:57user profileedit/delete messagepost reply


http://www.gamers.org/dhs/helpdocs/dmsp1666.html
This is exactly what you need. It's a very big help if you do any Doom related programs.

 

 

loser

.
209.161.237.94

"Re(2):Technical question about sound entries" , posted Mon 5 Mar 08:02user profileedit/delete messagepost reply


Thanks for the info. It is pretty useful, it confirms some of my finding. This is what it had to say on sound entries:

(1) 3 (means what?)
(2) 11025 (the sample rate, samples per second)
(3) N (the number of samples)
(4) 0

So I'm still no further ahead on that one.

 

 

deepteam

jack@sbsoftware.com
24.176.15.53

"Re(3):Technical question about sound entries" , posted Mon 5 Mar 11:09:user profileedit/delete messagepost reply


You just about got it:)

3 is always sound - but by itself is not 100% reliable for obvious reasons. The next steps are to do a "reasonable" check on the sample rate (it can vary), then verify the length with the size of the lump. Sometimes that's wrong, but never greater than the lump size.

Forgot to mention that your original definition was the correct one, although, I think the length is 4 bytes.

www.sbsoftware.com

[this message was edited by deepteam on Mon 5 Mar 17:13]