aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-08-18 11:02:54 -0700
committerChris Robinson <[email protected]>2012-08-18 11:06:39 -0700
commit3ae5fcbd7e8759b0542a46f20d17cfb5610c5218 (patch)
tree4b844b3169818324b5f19589599c3d529db26807 /OpenAL32/Include
parentac4fc4026c3b1b0b9487216399bef04d419b04b8 (diff)
Add the start of AL_SOFT_source_latency
This extension will provide a way for apps to get accurate latency and playback position information
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index f4f3b88e..d12fe3f8 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -18,6 +18,19 @@
#include "AL/alc.h"
#include "AL/alext.h"
+/* Define int64_t and uint64_t types */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <inttypes.h>
+#elif defined(_WIN32) && defined(__GNUC__)
+#include <stdint.h>
+#elif defined(_WIN32)
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+/* Fallback if nothing above works */
+#include <inttypes.h>
+#endif
+
#ifndef AL_SOFT_deferred_updates
#define AL_SOFT_deferred_updates 1
#define AL_DEFERRED_UPDATES_SOFT 0xC002
@@ -29,6 +42,19 @@ AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void);
#endif
#endif
+#ifndef AL_SOFT_source_latency
+#define AL_SOFT_source_latency 1
+#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200
+typedef int64_t ALint64SOFT;
+typedef uint64_t ALuint64SOFT;
+typedef void (AL_APIENTRY*LPALGETSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT*);
+typedef void (AL_APIENTRY*LPALGETSOURCEI64VSOFT)(ALuint,ALenum,ALint64SOFT*);
+#ifdef AL_ALEXT_PROTOTYPES
+AL_API void AL_APIENTRY alGetSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT *values);
+AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64SOFT *values);
+#endif
+#endif
+
#if defined(HAVE_STDINT_H)
#include <stdint.h>