Changes

From DoomWiki.org

Sound effects behave differently on level 8

894 bytes added, 21:35, 15 November 2005
after more investigation
Normally in [[Vanilla Doom]], sound effects decrease in volume with distance, with a cutoff at 1200 units. Sound effects originating at a distance of more than 1200 units from the player are not heard.
However, this rule does not apply This behavior is different on level 8. This affects level 8 when playing under any episode of [[Doom 1]] as well as MAP08 of Doom 2 and Final Doom. When playing on level 8, sound effects are not cut off. Furthermore, the decreasing volume effect behaves differently, with the result that sound effects in general are much louder.
As the [[Boss]] levels in Doom 1 all occur on level 8, it is possible that this behavior was intended so that the player could always hear the boss monster from any distance.
This code calculates the distance of the sound from the player. If the sound is greater than the clipping distance (1200 units), the function returns and the sound does not play. However, a specific test is made to see if the current level is level 8. If so, there is no distance cutoff.
 
// volume calculation
if (approx_dist < S_CLOSE_DIST)
{
*vol = snd_SfxVolume;
}
else if (gamemap == 8)
{
if (approx_dist > S_CLIPPING_DIST)
approx_dist = S_CLIPPING_DIST;
*vol = 15+ ((snd_SfxVolume-15)
*((S_CLIPPING_DIST - approx_dist)>>FRACBITS))
/ S_ATTENUATOR;
}
else
{
// distance effect
*vol = (snd_SfxVolume
* ((S_CLIPPING_DIST - approx_dist)>>FRACBITS))
/ S_ATTENUATOR;
}
 
This is the code which decreases the volume of sound effects with distance. A different calculation is used here for level 8, with the volume being made biased toward the maximum values. The result is that level 8 is very loud.
[[Category:Errors and bugs]]
3,610
edits