diff options
author | Chris Robinson <[email protected]> | 2011-06-16 14:40:37 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-06-16 14:40:37 -0700 |
commit | 58add24830068fd7535cef07ae11c7fd86a6a0b4 (patch) | |
tree | 2149199bf2121ca7cd613d28086f3ead8cfca7fd | |
parent | fdffbfd2c4dfa7b5c91366123e946a2ae723fb95 (diff) |
Call al[Get]Filterf directly from the *v equivalents
There are no filter parameters which take multiple values, and besides some
duplicated checks, they call straight through anyway.
-rw-r--r-- | OpenAL32/alFilter.c | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index 174d4d8d..1535dbce 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -265,26 +265,8 @@ AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues) { - ALCcontext *Context; - ALCdevice *Device; - - Context = GetContextSuspended(); - if(!Context) return; - - Device = Context->Device; - if(LookupFilter(Device->FilterMap, filter) != NULL) - { - switch(param) - { - default: - alFilterf(filter, param, pflValues[0]); - break; - } - } - else - alSetError(Context, AL_INVALID_NAME); - - ProcessContext(Context); + /* There are currently no multi-value filter parameters */ + alFilterf(filter, param, pflValues[0]); } AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue) @@ -391,26 +373,8 @@ AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pfl AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues) { - ALCcontext *Context; - ALCdevice *Device; - - Context = GetContextSuspended(); - if(!Context) return; - - Device = Context->Device; - if(LookupFilter(Device->FilterMap, filter) != NULL) - { - switch(param) - { - default: - alGetFilterf(filter, param, pflValues); - break; - } - } - else - alSetError(Context, AL_INVALID_NAME); - - ProcessContext(Context); + /* There are currently no multi-value filter parameters */ + alGetFilterf(filter, param, pflValues); } |