diff options
author | Chris Robinson <[email protected]> | 2008-01-04 14:40:38 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-04 14:40:38 -0800 |
commit | 5e48be27b840ff0a8b90baaae41e2809f7ca99ab (patch) | |
tree | ecbd5f31febd0e2d19e9682aa3e990667a9072ec /Alc/ALc.c | |
parent | 9ed574b39958c49f3e4b6ffc4c6a3153273d33b1 (diff) | |
parent | b3badbf97d95d84bb0de655275b00e30948e311f (diff) |
Merge branch 'master' into efx-experiment
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -33,6 +33,7 @@ #include "alThunk.h" #include "alSource.h" #include "alExtension.h" +#include "bs2b.h" /////////////////////////////////////////////////////// // DEBUG INFORMATION @@ -342,6 +343,8 @@ ALCvoid ProcessContext(ALCcontext *pContext) */ static ALvoid InitContext(ALCcontext *pContext) { + int level; + //Initialise listener pContext->Listener.Gain = 1.0f; pContext->Listener.MetersPerUnit = 1.0f; @@ -375,6 +378,14 @@ static ALvoid InitContext(ALCcontext *pContext) pContext->lNumMonoSources = pContext->Device->MaxNoOfSources - pContext->lNumStereoSources; strcpy(pContext->ExtensionList, "AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET"); + + level = GetConfigValueInt(NULL, "cf_level", 0); + if(level > 0 && level <= 6) + { + pContext->bs2b = calloc(1, sizeof(*pContext->bs2b)); + bs2b_set_srate(pContext->bs2b, pContext->Frequency); + bs2b_set_level(pContext->bs2b, level); + } } @@ -408,6 +419,9 @@ static ALCvoid ExitContext(ALCcontext *pContext) //Invalidate context pContext->LastError = AL_NO_ERROR; pContext->InUse = AL_FALSE; + + free(pContext->bs2b); + pContext->bs2b = NULL; } /////////////////////////////////////////////////////// |