[v0.57.3] SDL Mixer doesn't work on imported sound files
#1
This is partially a bug and partially a suggestion... If I change some sound files for D2, for example to some D1 sound files unused in D2, they still have a lacking playback quality in D2. Even though in D1X-Rebirth the crappy 11k sounds get transformed into something very listenable. Why won't SDLmixer apply such changes to 11k files imported from D1? I can provide the altered .S11 and .S22 files if you feel like taking a look at them.
I'm Xfing from Descent BB.net.

D1,5 in progress. Drop by here to find out more.
Reply
#2
Yes, please provide the files. I am not sure if I understand the bug correctly tho. But when using SDL_mixer you have to take in some rules. You said you were using D1 sounds. These usually are in 11Khz format. So if you put them in the .s22 - this will most likely won't work since SDL_mixer will upscale those files from 22Khz to 44Khz only. So if you want to use them in the .s22 file, you have to upscale these sounds to 22Khz first by yourself.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#3
Actually, most of the sounds I used were downloaded from the D2X-XL website where they're supposed to be already reworked into 44 kHz. Not sure about that, though. Descent 2 itself doesn't have a good renderer for transforming the 11 kHz files from Descent into better quality, most of the D1 sounds get ruined in the transition, a classic example being the Class 1 Driller's shriek.

Attaching a package with the sound files, you can examine them in DTX2. For them to work correctly in-game, you would also need a replaced HAM file. Oh well, I'll attach it too I guess Big Grin

The changes include:

- all D1 robots got their sounds back, including the D1 bosses
- D1 hidden doors will now play the D1 hidden door sound when opening and closing
- The gray door from D1 L12 etc appears in several levels in D2 - it too gets its original sound back

The robots sound tolerable, but the difference in quality is apparent when it comes to the door sounds.

http://www.sendspace.com/file/s8chx4

A good place to test out the door sound changes would be D2 level 8, which has both door types in abundance.
I'm Xfing from Descent BB.net.

D1,5 in progress. Drop by here to find out more.
Reply
#4
Same goes for 44Khz sounds. SDL_mixer would try to scale them nevertheless - i.e. double the rate (if stuffed in .s22). Currently you cannot add 44Khz sounds without SDL_mixer trying to scale them.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#5
Right, well... point is, even though the files I downloaded are supposedly 44k, they actually aren't, they're nothing more than manually reworked versions of the 11k sounds - and it shows. On the other hand, when SDLmixer is applied in D1X-Rebirth, we get amazing quality sounds for everything. Is there some way to export and save the D1 sounds as heard when processed by the SDLmixer?
I'm Xfing from Descent BB.net.

D1,5 in progress. Drop by here to find out more.
Reply
#6
I mean the point is that they are saved in 44Khz format. You'd just re-open them and resample to 22Khz (to put them in .s22) or 11Khz (if you store them in .s11). I think Audacity should be able to open and resample them properly.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#7
Yeah, the random files are probably saved in 44k alright. But ones taken straight out of Descent using DTX are always in 11k. So you suggest I try Audacity on those?

I think it actually might not be possible to get a good quality of D1 sounds in D2, as the D2 sounds were probably recorded in 22k right off the bat, and their 11k versions are downgraded from 22k, not the other way around. Still, SDL_Mixer manages to make Descent 1 noises sound perfectly up to date, so there must be a way.
I'm Xfing from Descent BB.net.

D1,5 in progress. Drop by here to find out more.
Reply
#8
I've been playing around with sounds myself too and it seems like D1 and D2 are hardcoded to use 11k and 22k top. Of course you could convert any 44k sound down to 22k (for D2 s22 file) but it wouldn't sound much better since it's going to be 22k not 44k. So, can't get good quality sound with 11k or 22k since the quality is nothing else than sample rate pretty much. I didn't try much with D1, because of the awkwardness with moding things there.
After some time I gave up on this, because it's not worth of much effort since there is no way to use custom sounds with just one mission (included in the hog file) - which would be nice feature to have.
...but yes, introduction of additional .s44 file would be good too. The game could look for that first and if absent then proceed to .s22
Reply
#9
Yeah, adding support for a .s44 is something I'll look into in the future.

And generally well, aqqman is sorta right. You have the source material of either 22 or 11khz. The ones you got from the XL site are just upscaled, too from whatever source they are taken from. SDL_mixer does that on the fly but it takes the setting from the engine. So normally it scales from 22 to 44 and - if you use the demo or the -sound11k setting, it will scale up from 11khz to 44khz.

And of course this is the base you are working on. Still I agree with Descender1032 that SDL_mixer does make them sound a bit better. The upscaling method is a bit different and it applies a filter or two which I think compliments the game actually. But it's still taken from lower source material.

But if you want SDL_mixer to do that, you must give it 22khz or 11khz sound samples. If you want D1 sounds, I would recommend taking them from Descent 1 game content right away.

EDIT: I just re-read this again but I am not sure how to better describe what I wanted to say. I hope I didn't confuse you guys too much.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#10
Perhaps I'll take a look-see of what D1 sounds processed through SDL_Mixer sound like in-game. In the Rebirth instance I'm using to test it, SDL_Mixer was actually switched off, so who knows what I'll get.
I'm Xfing from Descent BB.net.

D1,5 in progress. Drop by here to find out more.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)