aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-08-28 18:21:09 -0700
committerChris Robinson <[email protected]>2016-08-28 18:21:09 -0700
commit5bf0c6425868c2cd581786cfb0b74b96d4c07992 (patch)
tree54e59b41b3ac68d4ff14840a18732b108c6bbf3d /OpenAL32
parent3d59021702c2f6ea4dbdf5d2f6231fd945370e27 (diff)
Add a query for the maximum source gain limit
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h5
-rw-r--r--OpenAL32/alState.c26
2 files changed, 31 insertions, 0 deletions
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;
}