aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
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 /Alc/backends
parent2d6309d6fc68e5c2f658b48e6e44ba10be42848e (diff)
Include the limiter's lookAhead delay in the device latency
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/base.c1
-rw-r--r--Alc/backends/base.h9
2 files changed, 10 insertions, 0 deletions
diff --git a/Alc/backends/base.c b/Alc/backends/base.c
index a451fee9..9d8614b1 100644
--- a/Alc/backends/base.c
+++ b/Alc/backends/base.c
@@ -12,6 +12,7 @@
extern inline ALuint64 GetDeviceClockTime(ALCdevice *device);
extern inline void ALCdevice_Lock(ALCdevice *device);
extern inline void ALCdevice_Unlock(ALCdevice *device);
+extern inline ClockLatency GetClockLatency(ALCdevice *device);
/* Base ALCbackend method implementations. */
void ALCbackend_Construct(ALCbackend *self, ALCdevice *device)
diff --git a/Alc/backends/base.h b/Alc/backends/base.h
index 0de4e590..03db56e9 100644
--- a/Alc/backends/base.h
+++ b/Alc/backends/base.h
@@ -162,6 +162,15 @@ inline void ALCdevice_Lock(ALCdevice *device)
inline void ALCdevice_Unlock(ALCdevice *device)
{ V0(device->Backend,unlock)(); }
+
+inline ClockLatency GetClockLatency(ALCdevice *device)
+{
+ ClockLatency ret = V0(device->Backend,getClockLatency)();
+ ret.Latency += device->FixedLatency;
+ return ret;
+}
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif