diff options
author | Chris Robinson <[email protected]> | 2017-05-02 04:54:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-05-02 04:54:59 -0700 |
commit | 53c3d48fe0714f3b7a6cf4d12b28ed611277224d (patch) | |
tree | c9df100395d61ff1fe3280e08f8a1274c22d0aeb /Alc/effects/distortion.c | |
parent | 1e5334176eb2bd9bae367218570a5fd24597f827 (diff) |
Change some ALuint parameters to ALsizei
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 |