fabiangreffrath / woof

Woof! is a continuation of the Boom/MBF bloodline of Doom source ports.
GNU General Public License v2.0
186 stars 32 forks source link

Unconditionally skip first/last 16 bytes of DMX sound data #1732

Closed ceski-1 closed 1 month ago

ceski-1 commented 1 month ago

Chocolate Doom always skips the first 16 and last 16 bytes from every sound file. This is vanilla Doom behavior.

PrBoom+ incorrectly skips just the last 8 bytes from every sound file. The reasoning for this is not clear.

Chex Quest was likely created with tools that weren't aware of DMX padding. So there are non-zero starting/ending amplitudes that the authors never heard. There are wads with custom sounds that have the same issue. Since the tools used for these sounds didn't add the 32 bytes of dummy data, that means a small part of the actual waveform is cut off with Chocolate, PrBoom+, Woof (with this PR), and any port based on them.

To compensate, we apply an inaudible fade-in and fade-out (pending) to sounds that start or end at a non-zero amplitude to prevent clicking. As previously discovered, even the vanilla Doom sounds need this anyway, so this is an acceptable solution.

ceski-1 commented 1 month ago

With the other pending PR, this one is not strictly necessary and is provided as an "accurate" alternative only.