Reorder some stored source params
This commit is contained in:
parent
bb13f7f234
commit
6ab22e7cbb
@ -230,7 +230,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALSource->Params.WetGains[i] = WetGain[i] * ListenerGain;
|
ALSource->Params.Send[i].WetGain = WetGain[i] * ListenerGain;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update filter coefficients. Calculations based on the I3DL2
|
/* Update filter coefficients. Calculations based on the I3DL2
|
||||||
@ -494,7 +494,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
|
|||||||
|
|
||||||
if(!Slot || Slot->effect.type == AL_EFFECT_NULL)
|
if(!Slot || Slot->effect.type == AL_EFFECT_NULL)
|
||||||
{
|
{
|
||||||
ALSource->Params.WetGains[i] = 0.0f;
|
ALSource->Params.Send[i].WetGain = 0.0f;
|
||||||
WetGainHF[i] = 1.0f;
|
WetGainHF[i] = 1.0f;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -544,7 +544,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
|
|||||||
WetGainHF[i] *= ALSource->Send[i].WetFilter.GainHF;
|
WetGainHF[i] *= ALSource->Send[i].WetFilter.GainHF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ALSource->Params.WetGains[i] = WetGain[i] * ListenerGain;
|
ALSource->Params.Send[i].WetGain = WetGain[i] * ListenerGain;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply filter gains and filters
|
// Apply filter gains and filters
|
||||||
|
@ -163,11 +163,11 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
|
|||||||
Source->Send[out].Slot->effect.type == AL_EFFECT_NULL) \
|
Source->Send[out].Slot->effect.type == AL_EFFECT_NULL) \
|
||||||
continue; \
|
continue; \
|
||||||
\
|
\
|
||||||
WetSend = Source->Params.WetGains[out]; \
|
|
||||||
WetBuffer = Source->Send[out].Slot->WetBuffer; \
|
WetBuffer = Source->Send[out].Slot->WetBuffer; \
|
||||||
WetClickRemoval = Source->Send[out].Slot->ClickRemoval; \
|
WetClickRemoval = Source->Send[out].Slot->ClickRemoval; \
|
||||||
WetPendingClicks = Source->Send[out].Slot->PendingClicks; \
|
WetPendingClicks = Source->Send[out].Slot->PendingClicks; \
|
||||||
WetFilter = &Source->Params.Send[out].iirFilter; \
|
WetFilter = &Source->Params.Send[out].iirFilter; \
|
||||||
|
WetSend = Source->Params.Send[out].WetGain; \
|
||||||
\
|
\
|
||||||
pos = DataPosInt; \
|
pos = DataPosInt; \
|
||||||
frac = DataPosFrac; \
|
frac = DataPosFrac; \
|
||||||
@ -304,11 +304,11 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
|
|||||||
Source->Send[out].Slot->effect.type == AL_EFFECT_NULL) \
|
Source->Send[out].Slot->effect.type == AL_EFFECT_NULL) \
|
||||||
continue; \
|
continue; \
|
||||||
\
|
\
|
||||||
WetSend = Source->Params.WetGains[out]; \
|
|
||||||
WetBuffer = Source->Send[out].Slot->WetBuffer; \
|
WetBuffer = Source->Send[out].Slot->WetBuffer; \
|
||||||
WetClickRemoval = Source->Send[out].Slot->ClickRemoval; \
|
WetClickRemoval = Source->Send[out].Slot->ClickRemoval; \
|
||||||
WetPendingClicks = Source->Send[out].Slot->PendingClicks; \
|
WetPendingClicks = Source->Send[out].Slot->PendingClicks; \
|
||||||
WetFilter = &Source->Params.Send[out].iirFilter; \
|
WetFilter = &Source->Params.Send[out].iirFilter; \
|
||||||
|
WetSend = Source->Params.Send[out].WetGain; \
|
||||||
\
|
\
|
||||||
pos = DataPosInt; \
|
pos = DataPosInt; \
|
||||||
frac = DataPosFrac; \
|
frac = DataPosFrac; \
|
||||||
@ -453,7 +453,7 @@ static __inline ALfloat cos_lerp16(ALfloat val1, ALfloat val2, ALint frac)
|
|||||||
WetClickRemoval = Source->Send[out].Slot->ClickRemoval; \
|
WetClickRemoval = Source->Send[out].Slot->ClickRemoval; \
|
||||||
WetPendingClicks = Source->Send[out].Slot->PendingClicks; \
|
WetPendingClicks = Source->Send[out].Slot->PendingClicks; \
|
||||||
WetFilter = &Source->Params.Send[out].iirFilter; \
|
WetFilter = &Source->Params.Send[out].iirFilter; \
|
||||||
WetSend = Source->Params.WetGains[out]; \
|
WetSend = Source->Params.Send[out].WetGain; \
|
||||||
\
|
\
|
||||||
pos = DataPosInt; \
|
pos = DataPosInt; \
|
||||||
frac = DataPosFrac; \
|
frac = DataPosFrac; \
|
||||||
|
@ -84,17 +84,17 @@ typedef struct ALsource
|
|||||||
// Current target parameters used for mixing
|
// Current target parameters used for mixing
|
||||||
ALboolean NeedsUpdate;
|
ALboolean NeedsUpdate;
|
||||||
struct {
|
struct {
|
||||||
ALfloat DryGains[OUTPUTCHANNELS];
|
|
||||||
ALfloat WetGains[MAX_SENDS];
|
|
||||||
ALint Step;
|
ALint Step;
|
||||||
|
|
||||||
|
ALfloat DryGains[OUTPUTCHANNELS];
|
||||||
|
FILTER iirFilter;
|
||||||
|
ALfloat history[OUTPUTCHANNELS*2];
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
ALfloat WetGain;
|
||||||
FILTER iirFilter;
|
FILTER iirFilter;
|
||||||
ALfloat history[OUTPUTCHANNELS];
|
ALfloat history[OUTPUTCHANNELS];
|
||||||
} Send[MAX_SENDS];
|
} Send[MAX_SENDS];
|
||||||
|
|
||||||
FILTER iirFilter;
|
|
||||||
ALfloat history[OUTPUTCHANNELS*2];
|
|
||||||
} Params;
|
} Params;
|
||||||
|
|
||||||
ALvoid (*Update)(struct ALsource *self, const ALCcontext *context);
|
ALvoid (*Update)(struct ALsource *self, const ALCcontext *context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user