diff options
author | Chris Robinson <[email protected]> | 2014-05-14 01:24:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-14 01:24:18 -0700 |
commit | 4454ae25c753388c529b937ae2ce0f47f06d16c4 (patch) | |
tree | 02937f48f4e2f97b261c96acfe6393dbf11ddb57 | |
parent | 3582a44dfffedd76c4254a6c91d62055d707d239 (diff) |
Add HF Reference as a filter property
-rw-r--r-- | OpenAL32/Include/alFilter.h | 1 | ||||
-rw-r--r-- | OpenAL32/alFilter.c | 1 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h index 07b3f90b..6ff7c4fc 100644 --- a/OpenAL32/Include/alFilter.h +++ b/OpenAL32/Include/alFilter.h @@ -58,6 +58,7 @@ typedef struct ALfilter { ALfloat Gain; ALfloat GainHF; + ALfloat HFReference; void (*SetParami)(struct ALfilter *filter, ALCcontext *context, ALenum param, ALint val); void (*SetParamiv)(struct ALfilter *filter, ALCcontext *context, ALenum param, const ALint *vals); diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index 0d1dc52c..4d017ee2 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -532,6 +532,7 @@ static void InitFilterParams(ALfilter *filter, ALenum type) { filter->Gain = AL_LOWPASS_DEFAULT_GAIN; filter->GainHF = AL_LOWPASS_DEFAULT_GAINHF; + filter->HFReference = LOWPASSFREQREF; filter->SetParami = lp_SetParami; filter->SetParamiv = lp_SetParamiv; diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 5e24e848..167208e5 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -665,11 +665,13 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p { Source->Direct.Gain = 1.0f; Source->Direct.GainHF = 1.0f; + Source->Direct.HFReference = LOWPASSFREQREF; } else { Source->Direct.Gain = filter->Gain; Source->Direct.GainHF = filter->GainHF; + Source->Direct.HFReference = filter->HFReference; } UnlockContext(Context); Source->NeedsUpdate = AL_TRUE; @@ -738,11 +740,13 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p /* Disable filter */ Source->Send[values[1]].Gain = 1.0f; Source->Send[values[1]].GainHF = 1.0f; + Source->Send[values[1]].HFReference = LOWPASSFREQREF; } else { Source->Send[values[1]].Gain = filter->Gain; Source->Send[values[1]].GainHF = filter->GainHF; + Source->Send[values[1]].HFReference = filter->HFReference; } Source->NeedsUpdate = AL_TRUE; UnlockContext(Context); |