aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-29 22:29:10 -0700
committerChris Robinson <[email protected]>2011-09-29 22:29:10 -0700
commit087e75d47f14070a43a1b0332e639eedceea882c (patch)
tree263120d4b6c80a605d3d596433ebe826b5ae930e
parent9e2600cac4accf671382dad3add9ec1bad5bb2ca (diff)
Multiply by the reciprocal value instead of dividing
-rw-r--r--Alc/ALu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index f54b8e8e..9965e002 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -999,7 +999,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
for(c = 0;c < SamplesToDo;c++)
{
(*slot)->WetBuffer[c] += (*slot)->ClickRemoval[0];
- (*slot)->ClickRemoval[0] -= (*slot)->ClickRemoval[0] / 256.0f;
+ (*slot)->ClickRemoval[0] -= (*slot)->ClickRemoval[0] * (1.0f/256.0f);
}
(*slot)->ClickRemoval[0] += (*slot)->PendingClicks[0];
(*slot)->PendingClicks[0] = 0.0f;
@@ -1026,7 +1026,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
for(i = 0;i < SamplesToDo;i++)
{
device->DryBuffer[i][FRONT_CENTER] += device->ClickRemoval[FRONT_CENTER];
- device->ClickRemoval[FRONT_CENTER] -= device->ClickRemoval[FRONT_CENTER] / 256.0f;
+ device->ClickRemoval[FRONT_CENTER] -= device->ClickRemoval[FRONT_CENTER] * (1.0f/256.0f);
}
device->ClickRemoval[FRONT_CENTER] += device->PendingClicks[FRONT_CENTER];
device->PendingClicks[FRONT_CENTER] = 0.0f;
@@ -1039,7 +1039,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
for(c = 0;c < 2;c++)
{
device->DryBuffer[i][c] += device->ClickRemoval[c];
- device->ClickRemoval[c] -= device->ClickRemoval[c] / 256.0f;
+ device->ClickRemoval[c] -= device->ClickRemoval[c] * (1.0f/256.0f);
}
}
for(c = 0;c < 2;c++)
@@ -1055,7 +1055,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
for(c = 0;c < MAXCHANNELS;c++)
{
device->DryBuffer[i][c] += device->ClickRemoval[c];
- device->ClickRemoval[c] -= device->ClickRemoval[c] / 256.0f;
+ device->ClickRemoval[c] -= device->ClickRemoval[c] * (1.0f/256.0f);
}
}
for(c = 0;c < MAXCHANNELS;c++)