diff options
author | Chris Robinson <[email protected]> | 2014-05-17 07:54:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-17 07:54:25 -0700 |
commit | 82dd2d875e9b7549eaa63f9d1a3e08635aafa524 (patch) | |
tree | 7991685c891870e54f4dff7629f7e609bb23d7cd /OpenAL32/alSource.c | |
parent | 3a26ebef0bbe62f3143c5cb3de0e108f0bcb8b91 (diff) |
Apply high-pass source filters as needed
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 16e3a930..7f8944a8 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -666,12 +666,16 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p Source->Direct.Gain = 1.0f; Source->Direct.GainHF = 1.0f; Source->Direct.HFReference = LOWPASSFREQREF; + Source->Direct.GainLF = 1.0f; + Source->Direct.LFReference = HIGHPASSFREQREF; } else { Source->Direct.Gain = filter->Gain; Source->Direct.GainHF = filter->GainHF; Source->Direct.HFReference = filter->HFReference; + Source->Direct.GainLF = filter->GainLF; + Source->Direct.LFReference = filter->LFReference; } UnlockContext(Context); Source->NeedsUpdate = AL_TRUE; @@ -741,12 +745,16 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SrcIntProp p Source->Send[values[1]].Gain = 1.0f; Source->Send[values[1]].GainHF = 1.0f; Source->Send[values[1]].HFReference = LOWPASSFREQREF; + Source->Send[values[1]].GainLF = 1.0f; + Source->Send[values[1]].LFReference = HIGHPASSFREQREF; } else { Source->Send[values[1]].Gain = filter->Gain; Source->Send[values[1]].GainHF = filter->GainHF; Source->Send[values[1]].HFReference = filter->HFReference; + Source->Send[values[1]].GainLF = filter->GainLF; + Source->Send[values[1]].LFReference = filter->LFReference; } Source->NeedsUpdate = AL_TRUE; UnlockContext(Context); @@ -2319,11 +2327,15 @@ static ALvoid InitSourceParams(ALsource *Source) Source->Direct.Gain = 1.0f; Source->Direct.GainHF = 1.0f; Source->Direct.HFReference = LOWPASSFREQREF; + Source->Direct.GainLF = 1.0f; + Source->Direct.LFReference = HIGHPASSFREQREF; for(i = 0;i < MAX_SENDS;i++) { Source->Send[i].Gain = 1.0f; Source->Send[i].GainHF = 1.0f; Source->Send[i].HFReference = LOWPASSFREQREF; + Source->Send[i].GainLF = 1.0f; + Source->Send[i].LFReference = HIGHPASSFREQREF; } Source->NeedsUpdate = AL_TRUE; |