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

Doom sounds get cut off?

Recommended Posts

I'm working on a mod that I'm currently testing with Eternity. In it, I replaced DSBFG with another, longer sound, to be played in the same situation. It's a 22050 8bit sample rate sound, of a filesize roughly 88k. I used the Windows XP Sound Recorder to merge the Doom 3 soulsphere sound over (near the end of) a chanting whisper. I used XWE to import the sound and convert it to Doom format.

The problem? In the game, it only plays the first second and a quarter. I never get to hear the D3 soulsphere sound and it seems to stop right before.

Are Doom sounds limited by length in some manner? Note that for example the original Romero sight sound is very long and it doesn't cut.

EDIT: funny. It works fine in WinMBF. Going to test it in PrBoom now.
EDIT: well, sound works fine also in PrBoom.

Share this post


Link to post
printz said:

I'm working on a mod that I'm currently testing with Eternity. In it, I replaced DSBFG with another, longer sound, to be played in the same situation. It's a 22050 8bit sample rate sound, of a filesize roughly 88k. I used the Windows XP Sound Recorder to merge the Doom 3 soulsphere sound over (near the end of) a chanting whisper. I used XWE to import the sound and convert it to Doom format.

The problem? In the game, it only plays the first second and a quarter. I never get to hear the D3 soulsphere sound and it seems to stop right before.

Are Doom sounds limited by length in some manner? Note that for example the original Romero sight sound is very long and it doesn't cut.

EDIT: funny. It works fine in WinMBF. Going to test it in PrBoom now.
EDIT: well, sound works fine also in PrBoom.

If anything, Eternity should have played it more correctly than WinMBF. This is probably a bug of some kind. Could you send me a wad with the sound in it?

Share this post


Link to post

I remember a bug of this sort about Hell Ground; and it was found out that the bug was in the sound file itself. Here.

So, Eternity playing the sound more correctly than MBF would indeed result, if the case is the same, into the sound being cut off abruptly in EE. ;)

Share this post


Link to post

Yep, Doom.exe also cuts it. And BTW, as always, it works just fine in ZDoom :).

Perhaps there's a sound caveat I hadn't studied in Doom Editing School that got me. Here's the sample: http://www.speedyshare.com/files/22653327/testsend.wad for you all to hear it :P

EDIT to GEZ, due to my slow posting: thanks, I'll look there too.


EDIT: Yes, turned up I was right on the school part, Doom has a sample count limit, now that's a bummer if you want to create storytellers and the such in the game. I lowered the sound sample rate to 11025; I hated to do that but I had to, and now it plays correctly.

Share this post


Link to post
printz said:

And BTW, as always, it works just fine in ZDoom :).

Then it's not the issue I thought it could have been.

I suppose that you can always add the non-downsampled sound as well, with a different name. Then you can use SNDINFO lumps to change the sound that's meant to be played to the higher-rate version in engines that support them.

Share this post


Link to post
Gez said:

I suppose that you can always add the non-downsampled sound as well, with a different name. Then you can use SNDINFO lumps to change the sound that's meant to be played to the higher-rate version in engines that support them.

Why not dehacked? It should be more universal.

From 32innail.wad:

Text 6 6
pdiehipdieh_

Text 6 6
pistolpisto_

Text 6 6
plasmaplasm_

...


Does zdoom support it?

Share this post


Link to post

Well, since dehacked is universal, there is no way to target specifically ports that are known to accept higher-rate sounds...

Or it could be the other way around. If Eternity is the only engine that does not work with higher-rate sounds, then the downsampled one could be the one that's renamed and linked to with an EDF lump.

Share this post


Link to post

I'd really rather figure out why it cuts off and maybe fix that. I don't see how being compatible with this kind of limitation could ever be important, nor is it intentional AFAIK, as EE reads the sound sample count in a sound header as a 32-byte integer.

Share this post


Link to post
Quasar said:

EE reads the sound sample count in a sound header as a 32-byte integer.

I think most ports are using (lumplen-8) for the length of the sound.

The issue here is tools that convert the sound may assume that the length field is only 16-bit. The DOOM specs give that impression (and judging by printz's experience, vanilla also has that limitation) :-

  This data is in a RAW format for 8-bit 11 KHz mono sound - first is
an 8-byte header composed of 4 unsigned short integers: 

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

Each sample is a single byte, since they are 8-bit samples. The
maximum number of samples is 65535, so at 11 KHz, a little less than
6 seconds is the longest possible sound effect.

Share this post


Link to post

I wouldn't count on the sound being proper. I've heard some that are broken if the length does not match. Ignoring the length field should only be done if it's clear that it was just cut off (like the length of the sound's lower 16 bit match the field in the header.)

Share this post


Link to post
Graf Zahl said:

I wouldn't count on the sound being proper. I've heard some that are broken if the length does not match. Ignoring the length field should only be done if it's clear that it was just cut off (like the length of the sound's lower 16 bit match the field in the header.)

That's a good idea actually. :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×