aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-17 16:28:16 -0800
committerChris Robinson <[email protected]>2007-12-17 16:28:16 -0800
commit35a82970a3c1d175b3d77c5f42d0f720ff2884cb (patch)
tree9975ee00cfdf23ea61b033b02282f82e45a0ca81 /OpenAL32/alSource.c
parentac9bef0b316f02e2f607ac2c7117c7813f2bf87f (diff)
Implement AL_DIRECT_FILTER source property
Only AL_FILTER_NULL filter types are currently supported, however
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index ec8783c3..dd1e482c 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -636,6 +636,22 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
alSetError(AL_INVALID_VALUE);
break;
+ case AL_DIRECT_FILTER:
+ if(alIsFilter(lValue))
+ {
+ ALfilter *filter = (ALfilter*)ALTHUNK_LOOKUPENTRY(lValue);
+ if(!filter)
+ {
+ pSource->DirectFilter.type = AL_FILTER_NULL;
+ pSource->DirectFilter.filter = 0;
+ }
+ else
+ memcpy(&pSource->DirectFilter, filter, sizeof(*filter));
+ }
+ else
+ alSetError(AL_INVALID_VALUE);
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -716,6 +732,7 @@ ALAPI void ALAPIENTRY alSourceiv(ALuint source, ALenum eParam, const ALint* plVa
case AL_MAX_DISTANCE:
case AL_ROLLOFF_FACTOR:
case AL_REFERENCE_DISTANCE:
+ case AL_DIRECT_FILTER:
alSourcei(source, eParam, plValues[0]);
break;
@@ -1044,6 +1061,10 @@ ALAPI ALvoid ALAPIENTRY alGetSourcei(ALuint source, ALenum eParam, ALint *plValu
alSetError(AL_INVALID_OPERATION);
break;
+ case AL_DIRECT_FILTER:
+ *plValue = pSource->DirectFilter.filter;
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -1153,6 +1174,7 @@ ALAPI void ALAPIENTRY alGetSourceiv(ALuint source, ALenum eParam, ALint* plValue
case AL_ROLLOFF_FACTOR:
case AL_REFERENCE_DISTANCE:
case AL_SOURCE_TYPE:
+ case AL_DIRECT_FILTER:
alGetSourcei(source, eParam, plValues);
break;