From fdffbfd2c4dfa7b5c91366123e946a2ae723fb95 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 16 Jun 2011 10:53:01 -0700 Subject: Use the predefined filter macros instead of hardcoded values --- OpenAL32/alFilter.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenAL32') 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; } -- cgit v1.2.3