diff options
author | Chris Robinson <[email protected]> | 2016-08-28 18:21:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-08-28 18:21:09 -0700 |
commit | 5bf0c6425868c2cd581786cfb0b74b96d4c07992 (patch) | |
tree | 54e59b41b3ac68d4ff14840a18732b108c6bbf3d /OpenAL32/alState.c | |
parent | 3d59021702c2f6ea4dbdf5d2f6231fd945370e27 (diff) |
Add a query for the maximum source gain limit
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r-- | OpenAL32/alState.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c index 330d7fe2..c25aa63e 100644 --- a/OpenAL32/alState.c +++ b/OpenAL32/alState.c @@ -154,6 +154,11 @@ AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum pname) value = AL_TRUE; break; + case AL_GAIN_LIMIT_SOFT: + if(GAIN_MIX_MAX != 0.0f) + value = AL_TRUE; + break; + default: SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done); } @@ -195,6 +200,10 @@ AL_API ALdouble AL_APIENTRY alGetDouble(ALenum pname) value = (ALdouble)AL_TRUE; break; + case AL_GAIN_LIMIT_SOFT: + value = (ALdouble)GAIN_MIX_MAX; + break; + default: SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done); } @@ -236,6 +245,10 @@ AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname) value = (ALfloat)AL_TRUE; break; + case AL_GAIN_LIMIT_SOFT: + value = GAIN_MIX_MAX; + break; + default: SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done); } @@ -277,6 +290,10 @@ AL_API ALint AL_APIENTRY alGetInteger(ALenum pname) value = (ALint)AL_TRUE; break; + case AL_GAIN_LIMIT_SOFT: + value = (ALint)GAIN_MIX_MAX; + break; + default: SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done); } @@ -318,6 +335,10 @@ AL_API ALint64SOFT AL_APIENTRY alGetInteger64SOFT(ALenum pname) value = (ALint64SOFT)AL_TRUE; break; + case AL_GAIN_LIMIT_SOFT: + value = (ALint64SOFT)GAIN_MIX_MAX; + break; + default: SET_ERROR_AND_GOTO(context, AL_INVALID_ENUM, done); } @@ -341,6 +362,7 @@ AL_API ALvoid AL_APIENTRY alGetBooleanv(ALenum pname, ALboolean *values) case AL_DISTANCE_MODEL: case AL_SPEED_OF_SOUND: case AL_DEFERRED_UPDATES_SOFT: + case AL_GAIN_LIMIT_SOFT: values[0] = alGetBoolean(pname); return; } @@ -374,6 +396,7 @@ AL_API ALvoid AL_APIENTRY alGetDoublev(ALenum pname, ALdouble *values) case AL_DISTANCE_MODEL: case AL_SPEED_OF_SOUND: case AL_DEFERRED_UPDATES_SOFT: + case AL_GAIN_LIMIT_SOFT: values[0] = alGetDouble(pname); return; } @@ -407,6 +430,7 @@ AL_API ALvoid AL_APIENTRY alGetFloatv(ALenum pname, ALfloat *values) case AL_DISTANCE_MODEL: case AL_SPEED_OF_SOUND: case AL_DEFERRED_UPDATES_SOFT: + case AL_GAIN_LIMIT_SOFT: values[0] = alGetFloat(pname); return; } @@ -440,6 +464,7 @@ AL_API ALvoid AL_APIENTRY alGetIntegerv(ALenum pname, ALint *values) case AL_DISTANCE_MODEL: case AL_SPEED_OF_SOUND: case AL_DEFERRED_UPDATES_SOFT: + case AL_GAIN_LIMIT_SOFT: values[0] = alGetInteger(pname); return; } @@ -471,6 +496,7 @@ AL_API void AL_APIENTRY alGetInteger64vSOFT(ALenum pname, ALint64SOFT *values) case AL_DISTANCE_MODEL: case AL_SPEED_OF_SOUND: case AL_DEFERRED_UPDATES_SOFT: + case AL_GAIN_LIMIT_SOFT: values[0] = alGetInteger64SOFT(pname); return; } |