Random sound pitch removed

Random sound pitch is a feature that was removed unintentionally from Doom v1.4 due to changes in the DMX which were not taken into account by the Doom codebase. Sound effects are always played at a neutral pitch in later versions of DOS Doom, despite the fact that the DMX API calls are still passed a randomized pitch value. The bug is not present in recent console ports (Xbox and XBLA, and the Classic Doom engine used in the BFG Edition and Doom Classic Complete for the PS3) since they do not use DMX for audio.

This bug was fixed in Strawberry Doom, and source ports including the Eternity Engine, PrBoom, ZDoom, Chocolate Doom and derivatives Crispy Doom and Doom Retro offer it as an option.

Technical details
Two DMX functions are relevant for this bug: and.

The order in which parameters are passed was modified, and as a result Doom started sending the channel separation value (stereo positioning for the sound) as the pitch value.

While the change in the number of parameters prevented compilation until the source code was updated, this update was done poorly by id Software and the positioning and pitch change values were swapped in every call to these functions. Since all the parameters after the first are the same type of variables (int), the mistake does not prevent compilation and remained therefore undetected. As a result, the disappearance of random pitch changes was blamed on a bug in DMX.