Andrew Eikum : dsound: Apply rolloff factor to distance attenuation.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 29 09:22:17 CDT 2015
Module: wine
Branch: master
Commit: 2edb4bf320f5c09b658c382c8d8b9d9600d1f1e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2edb4bf320f5c09b658c382c8d8b9d9600d1f1e7
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Tue Apr 28 10:21:04 2015 -0500
dsound: Apply rolloff factor to distance attenuation.
---
dlls/dsound/sound3d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index 5eb02a6..e428053 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -207,7 +207,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 -= log10(flDistance/dsb->ds3db_ds3db.flMinDistance * flDistance/dsb->ds3db_ds3db.flMinDistance)*1000 * dsb->device->ds3dl.flRolloffFactor;
TRACE("dist. att: Distance = %f, MinDistance = %f => adjusting volume %d to %f\n", flDistance, dsb->ds3db_ds3db.flMinDistance, dsb->ds3db_lVolume, lVolume);
/* conning */
More information about the wine-cvs
mailing list