diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alSource.h | 2 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index df8fb44d..178e310f 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -80,6 +80,8 @@ typedef struct ALsource_struct ALfloat AirAbsorptionFactor; + ALfloat RoomRolloffFactor; + // Index to itself ALuint source; diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index bc81cd2c..db327227 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -355,6 +355,13 @@ ALAPI ALvoid ALAPIENTRY alSourcef(ALuint source, ALenum eParam, ALfloat flValue) alSetError(AL_INVALID_VALUE); break; + case AL_ROOM_ROLLOFF_FACTOR: + if (flValue >= 0.0f && flValue <= 1.0f) + pSource->RoomRolloffFactor = flValue; + else + alSetError(AL_INVALID_VALUE); + break; + case AL_SEC_OFFSET: case AL_SAMPLE_OFFSET: case AL_BYTE_OFFSET: @@ -480,6 +487,7 @@ ALAPI ALvoid ALAPIENTRY alSourcefv(ALuint source, ALenum eParam, const ALfloat * case AL_SAMPLE_OFFSET: case AL_BYTE_OFFSET: case AL_AIR_ABSORPTION_FACTOR: + case AL_ROOM_ROLLOFF_FACTOR: alSourcef(source, eParam, pflValues[0]); break; @@ -901,6 +909,10 @@ ALAPI ALvoid ALAPIENTRY alGetSourcef(ALuint source, ALenum eParam, ALfloat *pflV *pflValue = pSource->AirAbsorptionFactor; break; + case AL_ROOM_ROLLOFF_FACTOR: + *pflValue = pSource->RoomRolloffFactor; + break; + default: alSetError(AL_INVALID_ENUM); break; @@ -1010,6 +1022,7 @@ ALAPI ALvoid ALAPIENTRY alGetSourcefv(ALuint source, ALenum eParam, ALfloat *pfl case AL_REFERENCE_DISTANCE: case AL_CONE_OUTER_GAINHF: case AL_AIR_ABSORPTION_FACTOR: + case AL_ROOM_ROLLOFF_FACTOR: alGetSourcef(source, eParam, pflValues); break; |