Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
loser

Technical question about sound entries

Recommended Posts

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?

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×