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 | |
parent | 1e5334176eb2bd9bae367218570a5fd24597f827 (diff) |
Change some ALuint parameters to ALsizei
Diffstat (limited to 'Alc/effects')
-rw-r--r-- | Alc/effects/chorus.c | 30 | ||||
-rw-r--r-- | Alc/effects/compressor.c | 10 | ||||
-rw-r--r-- | Alc/effects/dedicated.c | 6 | ||||
-rw-r--r-- | Alc/effects/distortion.c | 11 | ||||
-rw-r--r-- | Alc/effects/echo.c | 6 | ||||
-rw-r--r-- | Alc/effects/equalizer.c | 10 | ||||
-rw-r--r-- | Alc/effects/flanger.c | 32 | ||||
-rw-r--r-- | Alc/effects/modulator.c | 32 | ||||
-rw-r--r-- | Alc/effects/null.c | 4 | ||||
-rw-r--r-- | Alc/effects/reverb.c | 8 |
10 files changed, 74 insertions, 75 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) { diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c index ab0a4216..25c7a3dc 100644 --- a/Alc/effects/compressor.c +++ b/Alc/effects/compressor.c @@ -43,7 +43,7 @@ typedef struct ALcompressorState { static ALvoid ALcompressorState_Destruct(ALcompressorState *state); static ALboolean ALcompressorState_deviceUpdate(ALcompressorState *state, ALCdevice *device); static ALvoid ALcompressorState_update(ALcompressorState *state, const ALCdevice *device, const ALeffectslot *slot, const ALeffectProps *props); -static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALcompressorState_process(ALcompressorState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALcompressorState) DEFINE_ALEFFECTSTATE_VTABLE(ALcompressorState); @@ -89,15 +89,15 @@ static ALvoid ALcompressorState_update(ALcompressorState *state, const ALCdevice slot->Params.Gain, state->Gain[i]); } -static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALcompressorState_process(ALcompressorState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { - ALuint i, j, k; - ALuint base; + ALsizei i, j, k; + ALsizei base; for(base = 0;base < SamplesToDo;) { ALfloat temps[64][4]; - ALuint td = minu(64, SamplesToDo-base); + ALsizei td = mini(64, SamplesToDo-base); /* Load samples into the temp buffer first. */ for(j = 0;j < 4;j++) diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c index 93c7416e..52d0ec6d 100644 --- a/Alc/effects/dedicated.c +++ b/Alc/effects/dedicated.c @@ -38,7 +38,7 @@ typedef struct ALdedicatedState { static ALvoid ALdedicatedState_Destruct(ALdedicatedState *state); static ALboolean ALdedicatedState_deviceUpdate(ALdedicatedState *state, ALCdevice *device); static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice *device, const ALeffectslot *Slot, const ALeffectProps *props); -static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALdedicatedState) DEFINE_ALEFFECTSTATE_VTABLE(ALdedicatedState); @@ -107,9 +107,9 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice * } } -static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { - ALuint i, c; + ALsizei i, c; SamplesIn = ASSUME_ALIGNED(SamplesIn, 16); SamplesOut = ASSUME_ALIGNED(SamplesOut, 16); 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 diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c index 1c37752f..c0b1bf63 100644 --- a/Alc/effects/echo.c +++ b/Alc/effects/echo.c @@ -53,7 +53,7 @@ typedef struct ALechoState { static ALvoid ALechoState_Destruct(ALechoState *state); static ALboolean ALechoState_deviceUpdate(ALechoState *state, ALCdevice *Device); static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props); -static ALvoid ALechoState_process(ALechoState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALechoState_process(ALechoState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALechoState) DEFINE_ALEFFECTSTATE_VTABLE(ALechoState); @@ -142,14 +142,14 @@ static ALvoid ALechoState_update(ALechoState *state, const ALCdevice *Device, co ComputePanningGains(Device->Dry, coeffs, gain, state->Gain[1]); } -static ALvoid ALechoState_process(ALechoState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALechoState_process(ALechoState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { const ALsizei mask = state->BufferLength-1; const ALsizei tap1 = state->Tap[0].delay; const ALsizei tap2 = state->Tap[1].delay; ALsizei offset = state->Offset; ALfloat x[2], y[2], in, out; - ALuint base, k; + ALsizei base, k; ALsizei i; x[0] = state->Filter.x[0]; diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c index 36683d79..5e6a2a9a 100644 --- a/Alc/effects/equalizer.c +++ b/Alc/effects/equalizer.c @@ -90,7 +90,7 @@ typedef struct ALequalizerState { static ALvoid ALequalizerState_Destruct(ALequalizerState *state); static ALboolean ALequalizerState_deviceUpdate(ALequalizerState *state, ALCdevice *device); static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice *device, const ALeffectslot *slot, const ALeffectProps *props); -static ALvoid ALequalizerState_process(ALequalizerState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALequalizerState_process(ALequalizerState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALequalizerState) DEFINE_ALEFFECTSTATE_VTABLE(ALequalizerState); @@ -200,15 +200,15 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice * } } -static ALvoid ALequalizerState_process(ALequalizerState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALequalizerState_process(ALequalizerState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { ALfloat (*Samples)[MAX_EFFECT_CHANNELS][MAX_UPDATE_SAMPLES] = state->SampleBuffer; - ALuint it, kt, ft; - ALuint base; + ALsizei it, kt, ft; + ALsizei base; for(base = 0;base < SamplesToDo;) { - ALuint td = minu(MAX_UPDATE_SAMPLES, SamplesToDo-base); + ALsizei td = mini(MAX_UPDATE_SAMPLES, SamplesToDo-base); for(ft = 0;ft < MAX_EFFECT_CHANNELS;ft++) ALfilterState_process(&state->filter[0][ft], Samples[0][ft], &SamplesIn[ft][base], td); 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) { diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c index 6d096048..e9026a62 100644 --- a/Alc/effects/modulator.c +++ b/Alc/effects/modulator.c @@ -33,10 +33,10 @@ typedef struct ALmodulatorState { DERIVE_FROM_TYPE(ALeffectState); - void (*Process)(ALfloat*, const ALfloat*, ALuint, const ALuint, ALuint); + void (*Process)(ALfloat*, const ALfloat*, ALsizei, const ALsizei, ALsizei); - ALuint index; - ALuint step; + ALsizei index; + ALsizei step; ALfloat Gain[MAX_EFFECT_CHANNELS][MAX_OUTPUT_CHANNELS]; @@ -46,7 +46,7 @@ typedef struct ALmodulatorState { static ALvoid ALmodulatorState_Destruct(ALmodulatorState *state); static ALboolean ALmodulatorState_deviceUpdate(ALmodulatorState *state, ALCdevice *device); static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props); -static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALmodulatorState) DEFINE_ALEFFECTSTATE_VTABLE(ALmodulatorState); @@ -56,26 +56,26 @@ DEFINE_ALEFFECTSTATE_VTABLE(ALmodulatorState); #define WAVEFORM_FRACONE (1<<WAVEFORM_FRACBITS) #define WAVEFORM_FRACMASK (WAVEFORM_FRACONE-1) -static inline ALfloat Sin(ALuint index) +static inline ALfloat Sin(ALsizei index) { return sinf(index*(F_TAU/WAVEFORM_FRACONE) - F_PI)*0.5f + 0.5f; } -static inline ALfloat Saw(ALuint index) +static inline ALfloat Saw(ALsizei index) { return (ALfloat)index / WAVEFORM_FRACONE; } -static inline ALfloat Square(ALuint index) +static inline ALfloat Square(ALsizei index) { return (ALfloat)((index >> (WAVEFORM_FRACBITS - 1)) & 1); } #define DECL_TEMPLATE(func) \ static void Modulate##func(ALfloat *restrict dst, const ALfloat *restrict src,\ - ALuint index, const ALuint step, ALuint todo) \ + ALsizei index, const ALsizei step, ALsizei todo) \ { \ - ALuint i; \ + ALsizei i; \ for(i = 0;i < todo;i++) \ { \ index += step; \ @@ -118,7 +118,7 @@ static ALboolean ALmodulatorState_deviceUpdate(ALmodulatorState *UNUSED(state), static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props) { ALfloat cw, a; - ALuint i; + ALsizei i; if(props->Modulator.Waveform == AL_RING_MODULATOR_SINUSOID) state->Process = ModulateSin; @@ -151,17 +151,17 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCdevice * Slot->Params.Gain, state->Gain[i]); } -static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { - const ALuint step = state->step; - ALuint index = state->index; - ALuint base; + const ALsizei step = state->step; + ALsizei index = state->index; + ALsizei base; for(base = 0;base < SamplesToDo;) { ALfloat temps[2][128]; - ALuint td = minu(128, SamplesToDo-base); - ALuint i, j, k; + ALsizei td = mini(128, SamplesToDo-base); + ALsizei i, j, k; for(j = 0;j < MAX_EFFECT_CHANNELS;j++) { diff --git a/Alc/effects/null.c b/Alc/effects/null.c index bff00b56..3812d8fc 100644 --- a/Alc/effects/null.c +++ b/Alc/effects/null.c @@ -17,7 +17,7 @@ typedef struct ALnullState { static ALvoid ALnullState_Destruct(ALnullState *state); static ALboolean ALnullState_deviceUpdate(ALnullState *state, ALCdevice *device); static ALvoid ALnullState_update(ALnullState *state, const ALCdevice *device, const ALeffectslot *slot, const ALeffectProps *props); -static ALvoid ALnullState_process(ALnullState *state, ALuint samplesToDo, const ALfloatBUFFERSIZE*restrict samplesIn, ALfloatBUFFERSIZE*restrict samplesOut, ALuint NumChannels); +static ALvoid ALnullState_process(ALnullState *state, ALsizei samplesToDo, const ALfloatBUFFERSIZE*restrict samplesIn, ALfloatBUFFERSIZE*restrict samplesOut, ALsizei NumChannels); static void *ALnullState_New(size_t size); static void ALnullState_Delete(void *ptr); @@ -64,7 +64,7 @@ static ALvoid ALnullState_update(ALnullState* UNUSED(state), const ALCdevice* UN * input to the output buffer. The result should be added to the output buffer, * not replace it. */ -static ALvoid ALnullState_process(ALnullState* UNUSED(state), ALuint UNUSED(samplesToDo), const ALfloatBUFFERSIZE*restrict UNUSED(samplesIn), ALfloatBUFFERSIZE*restrict UNUSED(samplesOut), ALuint UNUSED(NumChannels)) +static ALvoid ALnullState_process(ALnullState* UNUSED(state), ALsizei UNUSED(samplesToDo), const ALfloatBUFFERSIZE*restrict UNUSED(samplesIn), ALfloatBUFFERSIZE*restrict UNUSED(samplesOut), ALsizei UNUSED(NumChannels)) { } diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c index 6e5144fa..972bb717 100644 --- a/Alc/effects/reverb.c +++ b/Alc/effects/reverb.c @@ -186,7 +186,7 @@ typedef struct ALreverbState { static ALvoid ALreverbState_Destruct(ALreverbState *State); static ALboolean ALreverbState_deviceUpdate(ALreverbState *State, ALCdevice *Device); static ALvoid ALreverbState_update(ALreverbState *State, const ALCdevice *Device, const ALeffectslot *Slot, const ALeffectProps *props); -static ALvoid ALreverbState_process(ALreverbState *State, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels); +static ALvoid ALreverbState_process(ALreverbState *State, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels); DECLARE_DEFAULT_ALLOCATORS(ALreverbState) DEFINE_ALEFFECTSTATE_VTABLE(ALreverbState); @@ -1887,7 +1887,7 @@ static ALfloat EAXVerbPass(ALreverbState *State, const ALsizei todo, ALfloat fad return fade; } -static ALvoid ALreverbState_process(ALreverbState *State, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) +static ALvoid ALreverbState_process(ALreverbState *State, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels) { ProcMethodType ReverbProc = State->IsEax ? EAXVerbPass : VerbPass; ALfloat (*restrict afmt)[MAX_UPDATE_SAMPLES] = State->AFormatSamples; @@ -1895,12 +1895,12 @@ static ALvoid ALreverbState_process(ALreverbState *State, ALuint SamplesToDo, co ALfloat (*restrict late)[MAX_UPDATE_SAMPLES] = State->ReverbSamples; ALsizei fadeCount = State->FadeCount; ALfloat fade = (ALfloat)fadeCount / FADE_SAMPLES; - ALuint base, c; + ALsizei base, c; /* Process reverb for these samples. */ for(base = 0;base < SamplesToDo;) { - ALsizei todo = minu(SamplesToDo-base, MAX_UPDATE_SAMPLES); + ALsizei todo = mini(SamplesToDo-base, MAX_UPDATE_SAMPLES); /* If cross-fading, don't do more samples than there are to fade. */ if(FADE_SAMPLES-fadeCount > 0) todo = mini(todo, FADE_SAMPLES-fadeCount); |