[Feature Request] Add sound resampling and/or proper fadeouts for sfx samples
Currently when there's too much stuff going on in game sounds tend to overlap and clip, sometimes in a very harsh manner. Like, for example, when you're shooting from a blaster rifle it starts to happen very fast, sounds are cutting out too fast with clicking artifacts.
There are two issues at play:
- Dark Forces uses a sound priority system combined with a limited number of sound slots. So sounds will suddenly be stopped to make room for others.
- iMuse sound mixing is in 8/16-bit (8-bit samples, 16-bit work space to limit overflow).
- Unfortunately without the sound limits, sound in the original game gets pretty weird - the game was designed around those sound limits and so without them you can actually hear sounds you aren't supposed to in some cases.
- iMuse mixing will probably remain an option in the future, since there is some nostalgic factor at play here.
That said, there is a future task to support higher quality sound replacements. Which means an upgraded mixer using high precision math as an option. So this will probably go a long way towards fixing the issues you are hearing. Another thing that can be done is when a sound is told to stop playing because there are no free slots, it can be faded out rather than suddenly stopped.
Anyway, this work will likely happen once work on HD sound replacement support is done.
I'm going to close, HD support will be its own task.