diff options
author | Chris Robinson <[email protected]> | 2009-11-27 20:05:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-11-27 20:05:21 -0800 |
commit | 98ce1d14c12bf164206b1f0d3ab4dca6d627c8be (patch) | |
tree | 062296b8c92b0c5e43217b0d2ce8e902bc39e594 /OpenAL32/alSource.c | |
parent | 69f9ab88b9b9ad1b14bd1a143af230eab2a15b61 (diff) |
Update AL_EXTX_source_distance_model to require explicit enabling
The in-progress spec has been updated to reflect this
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index fb0ac514..06f3be70 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -32,7 +32,7 @@ #include "alThunk.h" #include "alAuxEffectSlot.h" -static ALvoid InitSourceParams(ALCcontext *Context, ALsource *pSource); +static ALvoid InitSourceParams(ALsource *pSource); static ALboolean GetSourceOffset(ALsource *pSource, ALenum eName, ALfloat *pflOffset, ALuint updateSize); static ALvoid ApplyOffset(ALsource *pSource, ALboolean bUpdateContext); static ALint GetByteOffset(ALsource *pSource); @@ -74,7 +74,7 @@ ALAPI ALvoid ALAPIENTRY alGenSources(ALsizei n,ALuint *sources) sources[i] = (ALuint)ALTHUNK_ADDENTRY(*list); (*list)->source = sources[i]; - InitSourceParams(Context, *list); + InitSourceParams(*list); Context->SourceCount++; i++; @@ -697,7 +697,8 @@ ALAPI ALvoid ALAPIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue) lValue == AL_EXPONENT_DISTANCE_CLAMPED) { pSource->DistanceModel = lValue; - pSource->NeedsUpdate = AL_TRUE; + if(pContext->SourceDistanceModel) + pSource->NeedsUpdate = AL_TRUE; } else alSetError(AL_INVALID_VALUE); @@ -1781,7 +1782,7 @@ ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint } -static ALvoid InitSourceParams(ALCcontext *Context, ALsource *pSource) +static ALvoid InitSourceParams(ALsource *pSource) { pSource->flInnerAngle = 360.0f; pSource->flOuterAngle = 360.0f; @@ -1812,7 +1813,7 @@ static ALvoid InitSourceParams(ALCcontext *Context, ALsource *pSource) pSource->RoomRolloffFactor = 0.0f; pSource->DopplerFactor = 1.0f; - pSource->DistanceModel = Context->DistanceModel; + pSource->DistanceModel = AL_INVERSE_DISTANCE_CLAMPED; pSource->state = AL_INITIAL; pSource->lSourceType = AL_UNDETERMINED; |