From 654788f2cf0bc9bf4fe5ee7a1ef61fd3e7b2b650 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 17 Dec 2007 21:56:31 -0800 Subject: Implement AL_CONE_OUTER_GAINHF source property --- OpenAL32/Include/alSource.h | 1 + OpenAL32/alSource.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index 88732da9..4493c006 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -66,6 +66,7 @@ typedef struct ALsource_struct ALfloat LastWetSample; ALboolean DryGainHFAuto; + ALfloat OuterGainHF; // Index to itself ALuint source; diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index d7d42889..1e30b1db 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -341,6 +341,13 @@ ALAPI ALvoid ALAPIENTRY alSourcef(ALuint source, ALenum eParam, ALfloat flValue) alSetError(AL_INVALID_VALUE); break; + case AL_CONE_OUTER_GAINHF: + if ((flValue >= 0.0f) && (flValue <= 1.0f)) + pSource->OuterGainHF = flValue; + else + alSetError(AL_INVALID_VALUE); + break; + case AL_SEC_OFFSET: case AL_SAMPLE_OFFSET: case AL_BYTE_OFFSET: @@ -461,6 +468,7 @@ ALAPI ALvoid ALAPIENTRY alSourcefv(ALuint source, ALenum eParam, const ALfloat * case AL_MIN_GAIN: case AL_MAX_GAIN: case AL_CONE_OUTER_GAIN: + case AL_CONE_OUTER_GAINHF: case AL_SEC_OFFSET: case AL_SAMPLE_OFFSET: case AL_BYTE_OFFSET: @@ -817,6 +825,10 @@ ALAPI ALvoid ALAPIENTRY alGetSourcef(ALuint source, ALenum eParam, ALfloat *pflV *pflValue = pSource->flOuterGain; break; + case AL_CONE_OUTER_GAINHF: + *pflValue = pSource->OuterGainHF; + break; + case AL_SEC_OFFSET: case AL_SAMPLE_OFFSET: case AL_BYTE_OFFSET: @@ -945,6 +957,7 @@ ALAPI ALvoid ALAPIENTRY alGetSourcefv(ALuint source, ALenum eParam, ALfloat *pfl case AL_CONE_INNER_ANGLE: case AL_CONE_OUTER_ANGLE: case AL_REFERENCE_DISTANCE: + case AL_CONE_OUTER_GAINHF: alGetSourcef(source, eParam, pflValues); break; -- cgit v1.2.3