diff options
Diffstat (limited to 'Alc/effects/distortion.c')
-rw-r--r-- | Alc/effects/distortion.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c index 84063e84..4619894d 100644 --- a/Alc/effects/distortion.c +++ b/Alc/effects/distortion.c @@ -46,7 +46,7 @@ typedef struct ALdistortionState { static ALvoid ALdistortionState_Destruct(ALdistortionState *state); static ALboolean ALdistortionState_deviceUpdate(ALdistortionState *state, ALCdevice *device); static ALvoid ALdistortionState_update(ALdistortionState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props); -static ALvoid ALdistortionState_process(ALdistortionState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALdistortionState_process(ALdistortionState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALdistortionState) DEFINE_ALEFFECTSTATE_VTABLE(ALdistortionState); @@ -106,17 +106,16 @@ static ALvoid ALdistortionState_update(ALdistortionState *state, const ALCdevice ComputeAmbientGains(Device->Dry, Slot->Params.Gain, state->Gain); } -static ALvoid ALdistortionState_process(ALdistortionState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALdistortionState_process(ALdistortionState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { const ALfloat fc = state->edge_coeff; - ALuint base; - ALuint it; - ALuint kt; + ALsizei it, kt; + ALsizei base; for(base = 0;base < SamplesToDo;) { float buffer[2][64 * 4]; - ALuint td = minu(64, SamplesToDo-base); + ALsizei td = mini(64, SamplesToDo-base); /* Perform 4x oversampling to avoid aliasing. Oversampling greatly * improves distortion quality and allows to implement lowpass and |