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/flanger.c | |
parent | 1e5334176eb2bd9bae367218570a5fd24597f827 (diff) |
Change some ALuint parameters to ALsizei
Diffstat (limited to 'Alc/effects/flanger.c')
-rw-r--r-- | Alc/effects/flanger.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c index 2a5d230c..346478e4 100644 --- a/Alc/effects/flanger.c +++ b/Alc/effects/flanger.c @@ -39,9 +39,9 @@ typedef struct ALflangerState { DERIVE_FROM_TYPE(ALeffectState); ALfloat *SampleBuffer[2]; - ALuint BufferLength; - ALuint offset; - ALuint lfo_range; + ALsizei BufferLength; + ALsizei offset; + ALsizei lfo_range; ALfloat lfo_scale; ALint lfo_disp; @@ -58,7 +58,7 @@ typedef struct ALflangerState { static ALvoid ALflangerState_Destruct(ALflangerState *state); static ALboolean ALflangerState_deviceUpdate(ALflangerState *state, ALCdevice *Device); static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props); -static ALvoid ALflangerState_process(ALflangerState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALflangerState_process(ALflangerState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALflangerState) DEFINE_ALEFFECTSTATE_VTABLE(ALflangerState); @@ -88,10 +88,10 @@ static ALvoid ALflangerState_Destruct(ALflangerState *state) static ALboolean ALflangerState_deviceUpdate(ALflangerState *state, ALCdevice *Device) { - ALuint maxlen; - ALuint it; + ALsizei maxlen; + ALsizei it; - maxlen = fastf2u(AL_FLANGER_MAX_DELAY * 3.0f * Device->Frequency) + 1; + maxlen = fastf2i(AL_FLANGER_MAX_DELAY * 3.0f * Device->Frequency) + 1; maxlen = NextPowerOf2(maxlen); if(maxlen != state->BufferLength) @@ -152,7 +152,7 @@ static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Devi else { /* Calculate LFO coefficient */ - state->lfo_range = fastf2u(frequency/rate + 0.5f); + state->lfo_range = fastf2i(frequency/rate + 0.5f); switch(state->waveform) { case FWF_Triangle: @@ -197,15 +197,15 @@ static inline void Sinusoid(ALint *delay_left, ALint *delay_right, ALuint offset } #define DECL_TEMPLATE(Func) \ -static void Process##Func(ALflangerState *state, const ALuint SamplesToDo, \ +static void Process##Func(ALflangerState *state, const ALsizei SamplesToDo, \ const ALfloat *restrict SamplesIn, ALfloat (*restrict out)[2]) \ { \ - const ALuint bufmask = state->BufferLength-1; \ + const ALsizei bufmask = state->BufferLength-1; \ ALfloat *restrict leftbuf = state->SampleBuffer[0]; \ ALfloat *restrict rightbuf = state->SampleBuffer[1]; \ - ALuint offset = state->offset; \ + ALsizei offset = state->offset; \ const ALfloat feedback = state->feedback; \ - ALuint it; \ + ALsizei it; \ \ for(it = 0;it < SamplesToDo;it++) \ { \ @@ -228,15 +228,15 @@ DECL_TEMPLATE(Sinusoid) #undef DECL_TEMPLATE -static ALvoid ALflangerState_process(ALflangerState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALflangerState_process(ALflangerState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { - ALuint it, kt; - ALuint base; + ALsizei it, kt; + ALsizei base; for(base = 0;base < SamplesToDo;) { ALfloat temps[128][2]; - ALuint td = minu(128, SamplesToDo-base); + ALsizei td = mini(128, SamplesToDo-base); switch(state->waveform) { |