aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-11 10:09:52 -0700
committerChris Robinson <[email protected]>2014-05-11 10:09:52 -0700
commit3582a44dfffedd76c4254a6c91d62055d707d239 (patch)
treece0b547c3fe382c063eb693610d0e69a181ef2bd
parent343200d2296f8ceb14371d12d6032056ec7fb9a3 (diff)
Make LOWPASSFREQREF a float value
-rw-r--r--Alc/effects/echo.c2
-rw-r--r--Alc/effects/reverb.c2
-rw-r--r--OpenAL32/Include/alFilter.h2
-rw-r--r--OpenAL32/alSource.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c
index 9513a611..049ae9c7 100644
--- a/Alc/effects/echo.c
+++ b/Alc/effects/echo.c
@@ -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);
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index d5a28823..245aed41 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -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);
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h
index 6f6db231..07b3f90b 100644
--- a/OpenAL32/Include/alFilter.h
+++ b/OpenAL32/Include/alFilter.h
@@ -7,7 +7,7 @@
extern "C" {
#endif
-#define LOWPASSFREQREF (5000)
+#define LOWPASSFREQREF (5000.0f)
/* Filters implementation is based on the "Cookbook formulae for audio *
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index e057acb1..5e24e848 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -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;