aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c10
-rw-r--r--Alc/mixer_c.c7
-rw-r--r--Alc/mixer_inc.c7
-rw-r--r--Alc/mixer_sse.c7
-rw-r--r--OpenAL32/Include/alSource.h4
5 files changed, 25 insertions, 10 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 821160a8..d0c17c0a 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -403,6 +403,10 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
SrcMatrix[c]);
}
}
+
+ ALSource->Params.Direct.OutBuffer = Device->DryBuffer;
+ ALSource->Params.Direct.ClickRemoval = Device->ClickRemoval;
+ ALSource->Params.Direct.PendingClicks = Device->PendingClicks;
for(i = 0;i < NumSends;i++)
{
ALeffectslot *Slot = ALSource->Send[i].Slot;
@@ -432,7 +436,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
{
- const ALCdevice *Device = ALContext->Device;
+ ALCdevice *Device = ALContext->Device;
ALfloat Velocity[3],Direction[3],Position[3],SourceToListener[3];
ALfloat InnerAngle,OuterAngle,Angle,Distance,ClampedDist;
ALfloat MinVolume,MaxVolume,MinDist,MaxDist,Rolloff;
@@ -500,6 +504,10 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
WetGainAuto = ALSource->WetGainAuto;
WetGainHFAuto = ALSource->WetGainHFAuto;
RoomRolloffBase = ALSource->RoomRolloffFactor;
+
+ ALSource->Params.Direct.OutBuffer = Device->DryBuffer;
+ ALSource->Params.Direct.ClickRemoval = Device->ClickRemoval;
+ ALSource->Params.Direct.PendingClicks = Device->PendingClicks;
for(i = 0;i < NumSends;i++)
{
ALeffectslot *Slot = ALSource->Send[i].Slot;
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c
index 39bf260c..a0a7b4d0 100644
--- a/Alc/mixer_c.c
+++ b/Alc/mixer_c.c
@@ -87,12 +87,13 @@ void MixDirect_C(ALCdevice *Device, DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = Device->DryBuffer;
- ALfloat *RESTRICT ClickRemoval = Device->ClickRemoval;
- ALfloat *RESTRICT PendingClicks = Device->PendingClicks;
+ ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = params->OutBuffer;
+ ALfloat *RESTRICT ClickRemoval = params->ClickRemoval;
+ ALfloat *RESTRICT PendingClicks = params->PendingClicks;
ALfloat DrySend;
ALuint pos;
ALuint c;
+ (void)Device;
for(c = 0;c < MaxChannels;c++)
{
diff --git a/Alc/mixer_inc.c b/Alc/mixer_inc.c
index 349af440..1630d5d9 100644
--- a/Alc/mixer_inc.c
+++ b/Alc/mixer_inc.c
@@ -33,9 +33,9 @@ void MixDirect_Hrtf(ALCdevice *Device, DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = Device->DryBuffer;
- ALfloat *RESTRICT ClickRemoval = Device->ClickRemoval;
- ALfloat *RESTRICT PendingClicks = Device->PendingClicks;
+ ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = params->OutBuffer;
+ ALfloat *RESTRICT ClickRemoval = params->ClickRemoval;
+ ALfloat *RESTRICT PendingClicks = params->PendingClicks;
const ALuint IrSize = params->Hrtf.IrSize;
const ALint *RESTRICT DelayStep = params->Hrtf.DelayStep;
ALfloat (*RESTRICT CoeffStep)[2] = params->Hrtf.CoeffStep;
@@ -50,6 +50,7 @@ void MixDirect_Hrtf(ALCdevice *Device, DirectParams *params,
ALfloat left, right;
ALuint pos;
ALuint c;
+ (void)Device;
pos = 0;
for(c = 0;c < IrSize;c++)
diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c
index f1d51cc4..6ce72cb4 100644
--- a/Alc/mixer_sse.c
+++ b/Alc/mixer_sse.c
@@ -137,12 +137,13 @@ void MixDirect_SSE(ALCdevice *Device, DirectParams *params,
const ALfloat *RESTRICT data, ALuint srcchan,
ALuint OutPos, ALuint SamplesToDo, ALuint BufferSize)
{
- ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = Device->DryBuffer;
- ALfloat *RESTRICT ClickRemoval = Device->ClickRemoval;
- ALfloat *RESTRICT PendingClicks = Device->PendingClicks;
+ ALfloat (*RESTRICT DryBuffer)[BUFFERSIZE] = params->OutBuffer;
+ ALfloat *RESTRICT ClickRemoval = params->ClickRemoval;
+ ALfloat *RESTRICT PendingClicks = params->PendingClicks;
ALfloat DrySend;
ALuint pos;
ALuint c;
+ (void)Device;
for(c = 0;c < MaxChannels;c++)
{
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 1a4410e4..8c231d8b 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -47,6 +47,10 @@ typedef struct HrtfParams {
} HrtfParams;
typedef struct DirectParams {
+ ALfloat (*OutBuffer)[BUFFERSIZE];
+ ALfloat *ClickRemoval;
+ ALfloat *PendingClicks;
+
HrtfParams Hrtf;
HrtfState *hrtfState;