dsound: Fix division by zero in DSOUND_Calc3DBuffer.

This commit is contained in:
Maarten Lankhorst 2007-07-08 16:38:05 +02:00 committed by Alexandre Julliard
parent 2b8a1815e6
commit a6ab4c51cf
1 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,9 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
/* my test show that for my way of calc., we need only half of angles */
DWORD dwInsideConeAngle = dsb->ds3db_ds3db.dwInsideConeAngle/2;
DWORD dwOutsideConeAngle = dsb->ds3db_ds3db.dwOutsideConeAngle/2;
if (dwOutsideConeAngle == dwInsideConeAngle)
++dwOutsideConeAngle;
/* full volume */
if (flAngle < dwInsideConeAngle)
flAngle = dwInsideConeAngle;