aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-02-01 16:37:11 -0800
committerChris Robinson <[email protected]>2014-02-01 16:37:11 -0800
commit69f3a7da6d80f98298ade5b940422efb3860c9a9 (patch)
tree8c81048944c5c59f33b3c60dd49dbe1adb0e951d /OpenAL32
parent9e2a8843a87b8f906a8da89965f473d32ddf40d4 (diff)
Keep track of a device clock time, based on the number of samples processed
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index b6a9f0ae..63c996e5 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -623,6 +623,9 @@ struct ALCdevice_struct
ALfloat SpeakerAngle[MaxChannels];
ALuint NumChan;
+ ALuint64 ClockBase;
+ ALuint SamplesDone;
+
/* Temp storage used for mixing. +1 for the predictive sample. */
ALIGN(16) ALfloat SampleData1[BUFFERSIZE+1];
ALIGN(16) ALfloat SampleData2[BUFFERSIZE+1];
@@ -669,6 +672,10 @@ struct ALCdevice_struct
#define INVALID_OFFSET (~0u)
+/* Nanosecond resolution for the device clock time. */
+#define DEVICE_CLOCK_RES U64(1000000000)
+
+
/* Must be less than 15 characters (16 including terminating null) for
* compatibility with pthread_setname_np limitations. */
#define MIXER_THREAD_NAME "alsoft-mixer"