diff options
author | Chris Robinson <[email protected]> | 2007-12-18 19:03:40 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-18 19:03:40 -0800 |
commit | afd3b71849d0d7484904f8e39825d83b894fe564 (patch) | |
tree | 51a5f6d5ce90486712a10d5c552a0ebc480fd29c /OpenAL32/alSource.c | |
parent | 4cc64fa9a8f6c138e137750f930800ec89e23a12 (diff) |
Implement AL_ROOM_ROLLOFF_FACTOR property
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 13 |
1 files changed, 13 insertions, 0 deletions
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; |