Fix more uses of unsigned sizes and offsets

This commit is contained in:
Chris Robinson
2017-02-10 06:20:16 -08:00
parent 5bd63ff03d
commit e92229f839
3 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -1369,9 +1369,9 @@ static inline ALubyte aluF2UB(ALfloat val)
#define DECL_TEMPLATE(T, func) \
static void Write_##T(ALfloatBUFFERSIZE *InBuffer, ALvoid *OutBuffer, \
ALuint SamplesToDo, ALuint numchans) \
ALsizei SamplesToDo, ALsizei numchans) \
{ \
ALuint i, j; \
ALsizei i, j; \
for(j = 0;j < numchans;j++) \
{ \
const ALfloat *in = InBuffer[j]; \
@@ -1394,7 +1394,7 @@ DECL_TEMPLATE(ALbyte, aluF2B)
void aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
{
ALuint SamplesToDo;
ALsizei SamplesToDo;
ALvoice *voice, *voice_end;
ALeffectslot *slot;
ALsource *source;
@@ -1406,7 +1406,7 @@ void aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
while(size > 0)
{
SamplesToDo = minu(size, BUFFERSIZE);
SamplesToDo = mini(size, BUFFERSIZE);
for(c = 0;c < device->Dry.NumChannels;c++)
memset(device->Dry.Buffer[c], 0, SamplesToDo*sizeof(ALfloat));
if(device->Dry.Buffer != device->RealOut.Buffer)
@@ -1559,7 +1559,7 @@ void aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
if(buffer)
{
ALfloat (*OutBuffer)[BUFFERSIZE] = device->RealOut.Buffer;
ALuint OutChannels = device->RealOut.NumChannels;
ALsizei OutChannels = device->RealOut.NumChannels;
#define WRITE(T, a, b, c, d) do { \
Write_##T((a), (b), (c), (d)); \
+4 -4
View File
@@ -129,16 +129,16 @@ void bs2b_clear(struct bs2b *bs2b)
memset(&bs2b->last_sample, 0, sizeof(bs2b->last_sample));
} /* bs2b_clear */
void bs2b_cross_feed(struct bs2b *bs2b, float *restrict Left, float *restrict Right, unsigned int SamplesToDo)
void bs2b_cross_feed(struct bs2b *bs2b, float *restrict Left, float *restrict Right, int SamplesToDo)
{
float lsamples[128][2];
float rsamples[128][2];
unsigned int base;
int base;
for(base = 0;base < SamplesToDo;)
{
unsigned int todo = minu(128, SamplesToDo-base);
unsigned int i;
int todo = mini(128, SamplesToDo-base);
int i;
/* Process left input */
lsamples[0][0] = bs2b->a0_lo*Left[0] +
+1 -1
View File
@@ -85,7 +85,7 @@ int bs2b_get_srate(struct bs2b *bs2b);
/* Clear buffer */
void bs2b_clear(struct bs2b *bs2b);
void bs2b_cross_feed(struct bs2b *bs2b, float *restrict Left, float *restrict Right, unsigned int SamplesToDo);
void bs2b_cross_feed(struct bs2b *bs2b, float *restrict Left, float *restrict Right, int SamplesToDo);
#ifdef __cplusplus
} /* extern "C" */