duke11235 wrote:> Can someone explain Jeff's hack, I really want to play BF1942 with
sound fixed,especially with kdog's comment 15.
Most likely this (watchout for wrapped lines):
Code:
diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index 252c763..afef379 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -210,7 +210,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
flDistance = dsb->ds3db_ds3db.flMinDistance;
/* attenuation proportional to the distance squared, converted to
millibels as in lVolume*/
- lVolume -= log10(flDistance/dsb->ds3db_ds3db.flMinDistance *
flDistance/dsb->ds3db_ds3db.flMinDistance)*1000;
+ lVolume += 1000 * log10(1.0/flDistance);
TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting
volume %d to %f\n", flDistance, dsb->ds3db_ds3db.flMinDistance,
dsb->ds3db_lVolume, lVolume);
/* conning */