aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-09-25 23:05:27 -0700
committerChris Robinson <[email protected]>2018-09-25 23:05:27 -0700
commit79314c4461333c7dfd7d425d69ffd121d6c163b6 (patch)
treec73f512dba6a9ca1ed8bcc2f2e09768046ca5a70 /OpenAL32
parent2d6309d6fc68e5c2f658b48e6e44ba10be42848e (diff)
Include the limiter's lookAhead delay in the device latency
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h1
-rw-r--r--OpenAL32/alSource.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 3e328157..dce51301 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -676,6 +676,7 @@ struct ALCdevice_struct {
ALuint64 ClockBase;
ALuint SamplesDone;
+ ALuint FixedLatency;
/* Temp storage used for mixer processing. */
alignas(16) ALfloat TempBuffer[4][BUFFERSIZE];
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 81d8c262..d7c68e4e 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1295,7 +1295,7 @@ static ALboolean GetSourcedv(ALsource *Source, ALCcontext *Context, SourceProp p
*/
values[0] = GetSourceSecOffset(Source, Context, &srcclock);
almtx_lock(&device->BackendLock);
- clocktime = V0(device->Backend,getClockLatency)();
+ clocktime = GetClockLatency(device);
almtx_unlock(&device->BackendLock);
if(srcclock == (ALuint64)clocktime.ClockTime)
values[1] = (ALdouble)clocktime.Latency / 1000000000.0;
@@ -1559,7 +1559,7 @@ static ALboolean GetSourcei64v(ALsource *Source, ALCcontext *Context, SourceProp
*/
values[0] = GetSourceSampleOffset(Source, Context, &srcclock);
almtx_lock(&device->BackendLock);
- clocktime = V0(device->Backend,getClockLatency)();
+ clocktime = GetClockLatency(device);
almtx_unlock(&device->BackendLock);
if(srcclock == (ALuint64)clocktime.ClockTime)
values[1] = clocktime.Latency;