aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/chorus.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/chorus.c')
-rw-r--r--Alc/effects/chorus.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index a44f9262..df8721b3 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -39,9 +39,9 @@ typedef struct ALchorusState {
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 ALchorusState {
static ALvoid ALchorusState_Destruct(ALchorusState *state);
static ALboolean ALchorusState_deviceUpdate(ALchorusState *state, ALCdevice *Device);
static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props);
-static ALvoid ALchorusState_process(ALchorusState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels);
+static ALvoid ALchorusState_process(ALchorusState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels);
DECLARE_DEFAULT_ALLOCATORS(ALchorusState)
DEFINE_ALEFFECTSTATE_VTABLE(ALchorusState);
@@ -88,8 +88,8 @@ static ALvoid ALchorusState_Destruct(ALchorusState *state)
static ALboolean ALchorusState_deviceUpdate(ALchorusState *state, ALCdevice *Device)
{
- ALuint maxlen;
- ALuint it;
+ ALsizei maxlen;
+ ALsizei it;
maxlen = fastf2u(AL_CHORUS_MAX_DELAY * 3.0f * Device->Frequency) + 1;
maxlen = NextPowerOf2(maxlen);
@@ -152,7 +152,7 @@ static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device
else
{
/* Calculate LFO coefficient */
- state->lfo_range = fastf2u(frequency/rate + 0.5f);
+ state->lfo_range = fastf2i(frequency/rate + 0.5f);
switch(state->waveform)
{
case CWF_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(ALchorusState *state, const ALuint SamplesToDo, \
+static void Process##Func(ALchorusState *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 ALchorusState_process(ALchorusState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels)
+static ALvoid ALchorusState_process(ALchorusState *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)
{