diff options
author | Chris Robinson <[email protected]> | 2012-10-14 11:21:52 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-10-14 11:21:52 -0700 |
commit | a852669dcebf7ff80a0698ca8afe6c8400480202 (patch) | |
tree | a190d8cb692f7e21e29b30283b7709b0cd957cbe | |
parent | 3240894cd5ee4d3bae6798b6d480ef2dfacc403a (diff) |
Store the output buffers in the DirectParams struct
-rw-r--r-- | Alc/ALu.c | 10 | ||||
-rw-r--r-- | Alc/mixer_c.c | 7 | ||||
-rw-r--r-- | Alc/mixer_inc.c | 7 | ||||
-rw-r--r-- | Alc/mixer_sse.c | 7 | ||||
-rw-r--r-- | OpenAL32/Include/alSource.h | 4 |
5 files changed, 25 insertions, 10 deletions
@@ -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; |