From afd3b71849d0d7484904f8e39825d83b894fe564 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 18 Dec 2007 19:03:40 -0800 Subject: Implement AL_ROOM_ROLLOFF_FACTOR property --- OpenAL32/alSource.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenAL32/alSource.c') 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; -- cgit v1.2.3