aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-09-11 09:38:06 -0700
committerChris Robinson <[email protected]>2012-09-11 09:40:08 -0700
commit01183ad93bbc65c090062c17fa7f4f3e0be05e0a (patch)
tree9b7195fd4d6b98e2b8a43f65eabc9aed07ebced1
parent3f97af4c8c79c8be69dac9e091d65d6e27418737 (diff)
Minor cleanups for variable declarations
-rw-r--r--Alc/mixer_inc.c38
-rw-r--r--Alc/mixer_sse.c9
2 files changed, 16 insertions, 31 deletions
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c
index db0941f0..a7332714 100644
--- a/Alc/mixer_inc.c
+++ b/Alc/mixer_inc.c
@@ -39,10 +39,11 @@ void MixDirect_Hrtf(ALsource *Source, ALCdevice *Device, DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- const ALint *RESTRICT DelayStep = params->Hrtf.DelayStep;
+ ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = Device->DryBuffer;
+ ALfloat *RESTRICT ClickRemoval = Device->ClickRemoval;
+ ALfloat *RESTRICT PendingClicks = Device->PendingClicks;
const ALuint IrSize = GetHrtfIrSize(Device->Hrtf);
- ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE];
- ALfloat *RESTRICT ClickRemoval, *RESTRICT PendingClicks;
+ const ALint *RESTRICT DelayStep = params->Hrtf.DelayStep;
ALfloat (*RESTRICT CoeffStep)[2] = params->Hrtf.CoeffStep;
ALfloat (*RESTRICT TargetCoeffs)[2] = params->Hrtf.Coeffs[srcchan];
ALuint *RESTRICT TargetDelay = params->Hrtf.Delay[srcchan];
@@ -56,10 +57,6 @@ void MixDirect_Hrtf(ALsource *Source, ALCdevice *Device, DirectParams *params,
ALuint pos;
ALuint c;
- DryBuffer = Device->DryBuffer;
- ClickRemoval = Device->ClickRemoval;
- PendingClicks = Device->PendingClicks;
-
pos = 0;
for(c = 0;c < IrSize;c++)
{
@@ -147,17 +144,14 @@ void MixDirect(ALsource *Source, ALCdevice *Device, DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE];
- ALfloat *RESTRICT ClickRemoval, *RESTRICT PendingClicks;
- ALIGN(16) ALfloat DrySend[MaxChannels];
+ ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = Device->DryBuffer;
+ ALfloat *RESTRICT ClickRemoval = Device->ClickRemoval;
+ ALfloat *RESTRICT PendingClicks = Device->PendingClicks;
+ ALfloat DrySend[MaxChannels];
ALuint pos;
ALuint c;
(void)Source;
- DryBuffer = Device->DryBuffer;
- ClickRemoval = Device->ClickRemoval;
- PendingClicks = Device->PendingClicks;
-
for(c = 0;c < MaxChannels;c++)
DrySend[c] = params->Gains[srcchan][c];
@@ -184,19 +178,13 @@ void MixDirect(ALsource *Source, ALCdevice *Device, DirectParams *params,
void MixSend(SendParams *params, const ALfloat *RESTRICT data,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- ALeffectslot *Slot;
- ALfloat WetSend;
- ALfloat *WetBuffer;
- ALfloat *WetClickRemoval;
- ALfloat *WetPendingClicks;
+ ALeffectslot *Slot = params->Slot;
+ ALfloat *WetBuffer = Slot->WetBuffer;
+ ALfloat *WetClickRemoval = Slot->ClickRemoval;
+ ALfloat *WetPendingClicks = Slot->PendingClicks;
+ ALfloat WetSend = params->Gain;
ALuint pos;
- Slot = params->Slot;
- WetBuffer = Slot->WetBuffer;
- WetClickRemoval = Slot->ClickRemoval;
- WetPendingClicks = Slot->PendingClicks;
- WetSend = params->Gain;
-
pos = 0;
if(OutPos == 0)
{
diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c
index 88d2c1ee..792fead6 100644
--- a/Alc/mixer_sse.c
+++ b/Alc/mixer_sse.c
@@ -132,17 +132,14 @@ void MixDirect_SSE(ALsource *Source, ALCdevice *Device, DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE];
- ALfloat *RESTRICT ClickRemoval, *RESTRICT PendingClicks;
+ ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = Device->DryBuffer;
+ ALfloat *RESTRICT ClickRemoval = Device->ClickRemoval;
+ ALfloat *RESTRICT PendingClicks = Device->PendingClicks;
ALfloat DrySend[MaxChannels];
ALuint pos;
ALuint c;
(void)Source;
- DryBuffer = Device->DryBuffer;
- ClickRemoval = Device->ClickRemoval;
- PendingClicks = Device->PendingClicks;
-
for(c = 0;c < MaxChannels;c++)
DrySend[c] = params->Gains[srcchan][c];