Make LOWPASSFREQREF a float value
This commit is contained in:
+1
-1
@@ -97,7 +97,7 @@ static ALvoid ALechoState_update(ALechoState *state, ALCdevice *Device, const AL
|
||||
|
||||
ALfilterState_setParams(&state->Filter, ALfilterType_HighShelf,
|
||||
1.0f - Slot->EffectProps.Echo.Damping,
|
||||
(ALfloat)LOWPASSFREQREF/frequency, 0.0f);
|
||||
LOWPASSFREQREF/frequency, 0.0f);
|
||||
|
||||
gain = Slot->Gain;
|
||||
dirGain = fabsf(lrpan);
|
||||
|
||||
@@ -1096,7 +1096,7 @@ static ALvoid ALreverbState_update(ALreverbState *State, ALCdevice *Device, cons
|
||||
}
|
||||
else
|
||||
{
|
||||
hfscale = (ALfloat)LOWPASSFREQREF / frequency;
|
||||
hfscale = LOWPASSFREQREF / frequency;
|
||||
ALfilterState_setParams(&State->LpFilter, ALfilterType_HighShelf,
|
||||
Slot->EffectProps.Reverb.GainHF,
|
||||
hfscale, 0.0f);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LOWPASSFREQREF (5000)
|
||||
#define LOWPASSFREQREF (5000.0f)
|
||||
|
||||
|
||||
/* Filters implementation is based on the "Cookbook formulae for audio *
|
||||
|
||||
+2
-2
@@ -2314,12 +2314,12 @@ static ALvoid InitSourceParams(ALsource *Source)
|
||||
|
||||
Source->Direct.Gain = 1.0f;
|
||||
Source->Direct.GainHF = 1.0f;
|
||||
Source->Direct.HFReference = (ALfloat)LOWPASSFREQREF;
|
||||
Source->Direct.HFReference = LOWPASSFREQREF;
|
||||
for(i = 0;i < MAX_SENDS;i++)
|
||||
{
|
||||
Source->Send[i].Gain = 1.0f;
|
||||
Source->Send[i].GainHF = 1.0f;
|
||||
Source->Send[i].HFReference = (ALfloat)LOWPASSFREQREF;
|
||||
Source->Send[i].HFReference = LOWPASSFREQREF;
|
||||
}
|
||||
|
||||
Source->NeedsUpdate = AL_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user