Commit 65e19a09 authored by Igor Kotrasinski's avatar Igor Kotrasinski Committed by Alexandre Julliard

dsound: Fix conning formula to correctly interpolate volume.

parent ea371a24
......@@ -242,7 +242,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
if (flAngle > dwOutsideConeAngle)
flAngle = dwOutsideConeAngle;
/* this probably isn't the right thing, but it's ok for the time being */
lVolume += ((dsb->ds3db_ds3db.lConeOutsideVolume)/((dwOutsideConeAngle) - (dwInsideConeAngle))) * flAngle;
lVolume += ((flAngle - dwInsideConeAngle)/(dwOutsideConeAngle - dwInsideConeAngle)) * dsb->ds3db_ds3db.lConeOutsideVolume;
}
TRACE("conning: Angle = %f deg; InsideConeAngle(/2) = %d deg; OutsideConeAngle(/2) = %d deg; ConeOutsideVolume = %d => adjusting volume to %f\n",
flAngle, dsb->ds3db_ds3db.dwInsideConeAngle/2, dsb->ds3db_ds3db.dwOutsideConeAngle/2, dsb->ds3db_ds3db.lConeOutsideVolume, lVolume);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment