There's progress concerning the sound issues that have plagued people lately.
In IRC, Hendricks mentioned that current EDuke32 versions don't play all explosion sounds from the destructible building sequence in E1L2. This inspired me to bisect the synthesis builds, and indeed, reverting the following change of r1601 will make it sound like before again:
if (g_sounds[num].num > 0 && PN != MUSICANDSFX)
- {
- if (g_sounds[num].SoundOwner[0].i == i) S_StopSound(num);
- else if (g_sounds[num].num > 1) S_StopSound(num);
- else if (A_CheckEnemySprite(&sprite[i]) && sprite[i].extra <= 0) S_StopSound(num);
- }
+ S_StopEnvSound(num, i);
However, this does not fix the abrupt sound cutoffs that can be reproduced by e.g. kicking against a wall in WGR2. By chance (and thanks to Micky's WGR2 map), I found an easy way of producing a very strange sonic inconsistency, a test map for which is attached with this post. Just fire an RPG into the distance, and then kick continuously againt the wall in front of you. Observe.
Now, the interesting thing is that it's been like this since version 1.3D! (But, as far as I can see, it wasn't present in v0.99).
I believe that it's this bug that is at the root of all the other sound cutoffs.
For the time being, I will not change the sound code because I'm not knowledgeable enough about it: I don't fully understand the intent of the first change and I haven't got a solution for the second one, though it'll probably be sensible to start at S_Update() and see about how sounds are associated with sprite IDs.
EDIT: ...And it's all clear. Woe to sounds that outlive their owning sprites
![:)](https://forums.duke4.net/public/style_emoticons/default/smile.gif)
. This is a big issue.