aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c1
-rw-r--r--OpenAL32/Include/alMain.h5
-rw-r--r--OpenAL32/alState.c26
3 files changed, 32 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 26cdc771..61036585 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -552,6 +552,7 @@ static const ALCenums enumeration[] = {
DECL(AL_SPEED_OF_SOUND),
DECL(AL_SOURCE_DISTANCE_MODEL),
DECL(AL_DEFERRED_UPDATES_SOFT),
+ DECL(AL_GAIN_LIMIT_SOFT),
DECL(AL_INVERSE_DISTANCE),
DECL(AL_INVERSE_DISTANCE_CLAMPED),
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 74f967ae..c6b816d9 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -127,6 +127,11 @@ AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
#endif
#endif
+#ifndef AL_SOFT_gain_clamp_ex
+#define AL_SOFT_gain_clamp_ex 1
+#define AL_GAIN_LIMIT_SOFT 0x200E
+#endif
+
typedef ALint64SOFT ALint64;
typedef ALuint64SOFT ALuint64;
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;
}