aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-16 10:53:01 -0700
committerChris Robinson <[email protected]>2011-06-16 10:53:01 -0700
commitfdffbfd2c4dfa7b5c91366123e946a2ae723fb95 (patch)
tree11f401be9dc34afddd07e8ddb882a5279e774a36
parent357f841e88df69b29118e2ee6d84fe56c786a610 (diff)
Use the predefined filter macros instead of hardcoded values
-rw-r--r--OpenAL32/alFilter.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index c740e4ff..174d4d8d 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -231,14 +231,16 @@ AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue
switch(param)
{
case AL_LOWPASS_GAIN:
- if(flValue >= 0.0f && flValue <= 1.0f)
+ if(flValue >= AL_LOWPASS_MIN_GAIN &&
+ flValue <= AL_LOWPASS_MAX_GAIN)
ALFilter->Gain = flValue;
else
alSetError(Context, AL_INVALID_VALUE);
break;
case AL_LOWPASS_GAINHF:
- if(flValue >= 0.0f && flValue <= 1.0f)
+ if(flValue >= AL_LOWPASS_MIN_GAINHF &&
+ flValue <= AL_LOWPASS_MAX_GAINHF)
ALFilter->GainHF = flValue;
else
alSetError(Context, AL_INVALID_VALUE);
@@ -446,6 +448,6 @@ static void InitFilterParams(ALfilter *filter, ALenum type)
{
filter->type = type;
- filter->Gain = 1.0;
- filter->GainHF = 1.0;
+ filter->Gain = AL_LOWPASS_DEFAULT_GAIN;
+ filter->GainHF = AL_LOWPASS_DEFAULT_GAINHF;
}