summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-17 21:33:05 -0800
committerChris Robinson <[email protected]>2007-12-17 21:33:05 -0800
commit06f2076f04f2a8f938028664021fa501a4374d2d (patch)
tree38d7a7219073bf624a0c204f3195a57ced2753df /OpenAL32/alSource.c
parentfc43a139278474c8de159cc87e8138dc101bff50 (diff)
Implement AL_DIRECT_FILTER_GAINHF_AUTO source property
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index dd1e482c..d7d42889 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -652,6 +652,13 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
alSetError(AL_INVALID_VALUE);
break;
+ case AL_DIRECT_FILTER_GAINHF_AUTO:
+ if(lValue == AL_TRUE || lValue == AL_FALSE)
+ pSource->DryGainHFAuto = lValue;
+ else
+ alSetError(AL_INVALID_VALUE);
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -733,6 +740,7 @@ ALAPI void ALAPIENTRY alSourceiv(ALuint source, ALenum eParam, const ALint* plVa
case AL_ROLLOFF_FACTOR:
case AL_REFERENCE_DISTANCE:
case AL_DIRECT_FILTER:
+ case AL_DIRECT_FILTER_GAINHF_AUTO:
alSourcei(source, eParam, plValues[0]);
break;
@@ -1065,6 +1073,10 @@ ALAPI ALvoid ALAPIENTRY alGetSourcei(ALuint source, ALenum eParam, ALint *plValu
*plValue = pSource->DirectFilter.filter;
break;
+ case AL_DIRECT_FILTER_GAINHF_AUTO:
+ *plValue = pSource->DryGainHFAuto;
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -1175,6 +1187,7 @@ ALAPI void ALAPIENTRY alGetSourceiv(ALuint source, ALenum eParam, ALint* plValue
case AL_REFERENCE_DISTANCE:
case AL_SOURCE_TYPE:
case AL_DIRECT_FILTER:
+ case AL_DIRECT_FILTER_GAINHF_AUTO:
alGetSourcei(source, eParam, plValues);
break;
@@ -1852,6 +1865,8 @@ static ALvoid InitSourceParams(ALsource *pSource)
pSource->flMaxGain = 1.0f;
pSource->flOuterGain = 0.0f;
+ pSource->DryGainHFAuto = AL_TRUE;
+
pSource->state = AL_INITIAL;
pSource->lSourceType = AL_UNDETERMINED;