Avoid unnecessarily using type aliases
This commit is contained in:
@@ -1521,7 +1521,7 @@ static void ApplyStablizer(FrontStablizer *Stablizer, ALfloat (*restrict Buffer)
|
||||
}
|
||||
}
|
||||
|
||||
static void ApplyDistanceComp(ALfloatBUFFERSIZE *restrict Samples, DistanceComp *distcomp,
|
||||
static void ApplyDistanceComp(ALfloat (*restrict Samples)[BUFFERSIZE], DistanceComp *distcomp,
|
||||
ALfloat *restrict Values, ALsizei SamplesToDo, ALsizei numchans)
|
||||
{
|
||||
ALsizei i, c;
|
||||
@@ -1564,7 +1564,7 @@ static void ApplyDistanceComp(ALfloatBUFFERSIZE *restrict Samples, DistanceComp
|
||||
}
|
||||
}
|
||||
|
||||
static void ApplyDither(ALfloatBUFFERSIZE *restrict Samples, ALuint *dither_seed,
|
||||
static void ApplyDither(ALfloat (*restrict Samples)[BUFFERSIZE], ALuint *dither_seed,
|
||||
const ALfloat quant_scale, const ALsizei SamplesToDo,
|
||||
const ALsizei numchans)
|
||||
{
|
||||
@@ -1618,8 +1618,9 @@ DECL_TEMPLATE(ALuint, Conv_ALint, 2147483648u)
|
||||
#undef DECL_TEMPLATE
|
||||
|
||||
#define DECL_TEMPLATE(T, A) \
|
||||
static void Write##A(const ALfloatBUFFERSIZE *InBuffer, ALvoid *OutBuffer, \
|
||||
ALsizei Offset, ALsizei SamplesToDo, ALsizei numchans) \
|
||||
static void Write##A(const ALfloat (*restrict InBuffer)[BUFFERSIZE], \
|
||||
ALvoid *OutBuffer, ALsizei Offset, ALsizei SamplesToDo, \
|
||||
ALsizei numchans) \
|
||||
{ \
|
||||
ALsizei i, j; \
|
||||
for(j = 0;j < numchans;j++) \
|
||||
|
||||
+2
-2
@@ -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 ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props);
|
||||
static ALvoid ALnullState_process(ALnullState *state, ALsizei samplesToDo, const ALfloatBUFFERSIZE*restrict samplesIn, ALfloatBUFFERSIZE*restrict samplesOut, ALsizei NumChannels);
|
||||
static ALvoid ALnullState_process(ALnullState *state, ALsizei samplesToDo, const ALfloat (*restrict samplesIn)[BUFFERSIZE], ALfloat (*restrict samplesOut)[BUFFERSIZE], ALsizei mumChannels);
|
||||
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 ALCcontext* U
|
||||
* input to the output buffer. The result should be added to the output buffer,
|
||||
* not replace it.
|
||||
*/
|
||||
static ALvoid ALnullState_process(ALnullState* UNUSED(state), ALsizei UNUSED(samplesToDo), const ALfloatBUFFERSIZE*restrict UNUSED(samplesIn), ALfloatBUFFERSIZE*restrict UNUSED(samplesOut), ALsizei UNUSED(NumChannels))
|
||||
static ALvoid ALnullState_process(ALnullState* UNUSED(state), ALsizei UNUSED(samplesToDo), const ALfloatBUFFERSIZE*restrict UNUSED(samplesIn), ALfloatBUFFERSIZE*restrict UNUSED(samplesOut), ALsizei UNUSED(numChannels))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,11 @@ struct ALeffectStateVtable {
|
||||
void (*const Delete)(void *ptr);
|
||||
};
|
||||
|
||||
/* Small hack to use a pointer-to-array types as a normal argument type.
|
||||
* Shouldn't be used directly.
|
||||
*/
|
||||
typedef ALfloat ALfloatBUFFERSIZE[BUFFERSIZE];
|
||||
|
||||
#define DEFINE_ALEFFECTSTATE_VTABLE(T) \
|
||||
DECLARE_THUNK(T, ALeffectState, void, Destruct) \
|
||||
DECLARE_THUNK1(T, ALeffectState, ALboolean, deviceUpdate, ALCdevice*) \
|
||||
|
||||
@@ -720,12 +720,6 @@ inline ALint GetChannelIdxByName(const RealMixParams *real, enum Channel chan)
|
||||
|
||||
vector_al_string SearchDataFiles(const char *match, const char *subdir);
|
||||
|
||||
/* Small hack to use a pointer-to-array types as a normal argument type.
|
||||
* Shouldn't be used directly.
|
||||
*/
|
||||
typedef ALfloat ALfloatBUFFERSIZE[BUFFERSIZE];
|
||||
typedef ALfloat ALfloat2[2];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user