aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/Include/alSource.h2
-rw-r--r--OpenAL32/alSource.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index d210ae9b..88732da9 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -65,6 +65,8 @@ typedef struct ALsource_struct
ALfloat LastDrySample;
ALfloat LastWetSample;
+ ALboolean DryGainHFAuto;
+
// Index to itself
ALuint source;
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;