aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-08-17 13:38:52 -0700
committerChris Robinson <[email protected]>2012-08-17 13:38:52 -0700
commitac4fc4026c3b1b0b9487216399bef04d419b04b8 (patch)
tree730148652e49723e644f7df8107c0c3be3c19821 /OpenAL32/Include/alu.h
parent9737f683150180a5531d276959030ffa0bd35492 (diff)
Add a device method to retrieve the active latency
This is effectively the time until the next update will be heard by the user, or the closest approximation thereof, in nanoseconds.
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index cd8f1554..f623589f 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -201,6 +201,13 @@ static __inline ALint64 maxi64(ALint64 a, ALint64 b)
static __inline ALint64 clampi64(ALint64 val, ALint64 min, ALint64 max)
{ return mini64(max, maxi64(min, val)); }
+static __inline ALuint64 minu64(ALuint64 a, ALuint64 b)
+{ return ((a > b) ? b : a); }
+static __inline ALuint64 maxu64(ALuint64 a, ALuint64 b)
+{ return ((a > b) ? a : b); }
+static __inline ALuint64 clampu64(ALuint64 val, ALuint64 min, ALuint64 max)
+{ return minu64(max, maxu64(min, val)); }
+
static __inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu)
{