Avoid using a variable for array sizes and const variable initialization

This commit is contained in:
Chris Robinson
2011-01-23 22:30:18 -08:00
parent c95bd6cadf
commit 2b7324c06e
+5 -5
View File
@@ -192,17 +192,17 @@ DECL_TEMPLATE(ALubyte, cubic8)
#undef DECL_TEMPLATE
#define DECL_TEMPLATE(T, count, sampler) \
static void Mix_##T##_##count##_##sampler(ALsource *Source, ALCdevice *Device,\
#define DECL_TEMPLATE(T, chnct, sampler) \
static void Mix_##T##_##chnct##_##sampler(ALsource *Source, ALCdevice *Device,\
const T *data, ALuint *DataPosInt, ALuint *DataPosFrac, \
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize) \
{ \
const ALuint Channels = count; \
const ALfloat scaler = 1.0f/Channels; \
const ALuint Channels = chnct; \
const ALfloat scaler = 1.0f/chnct; \
ALfloat (*DryBuffer)[MAXCHANNELS]; \
ALfloat *ClickRemoval, *PendingClicks; \
ALuint pos, frac; \
ALfloat DrySend[Channels][MAXCHANNELS]; \
ALfloat DrySend[chnct][MAXCHANNELS]; \
FILTER *DryFilter; \
ALuint BufferIdx; \
ALuint increment; \