Remove an unnecessary special-case for the click removal

This commit is contained in:
Chris Robinson
2014-02-01 19:31:05 -08:00
parent 11a7b3e8f8
commit 7bfea9087e
+1 -14
View File
@@ -1139,20 +1139,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
/* Click-removal. Could do better; this only really handles immediate
* changes between updates where a predictive sample could be
* generated. Delays caused by effects and HRTF aren't caught. */
if(device->FmtChans == DevFmtMono)
{
ALfloat offset = device->ClickRemoval[FrontCenter];
if(offset < (1.0f/32768.0f))
offset = 0.0f;
else for(i = 0;i < SamplesToDo;i++)
{
device->DryBuffer[FrontCenter][i] += offset;
offset -= offset * (1.0f/256.0f);
}
device->ClickRemoval[FrontCenter] = offset + device->PendingClicks[FrontCenter];
device->PendingClicks[FrontCenter] = 0.0f;
}
else if(device->FmtChans == DevFmtStereo)
if(device->FmtChans == DevFmtStereo)
{
/* Assumes the first two channels are FrontLeft and FrontRight */
for(c = 0;c < 2;c++)