aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/base.h')
-rw-r--r--alc/backends/base.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/alc/backends/base.h b/alc/backends/base.h
index e1f53405..f38c1d45 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -55,14 +55,8 @@ enum class BackendType {
/* Helper to get the current clock time from the device's ClockBase, and
* SamplesDone converted from the sample rate.
*/
-inline std::chrono::nanoseconds GetDeviceClockTime(DeviceBase *device)
-{
- using std::chrono::seconds;
- using std::chrono::nanoseconds;
-
- auto ns = nanoseconds{seconds{device->SamplesDone}} / device->Frequency;
- return device->ClockBase + ns;
-}
+inline std::chrono::nanoseconds GetDeviceClockTime(const DeviceBase *device) noexcept
+{ return device->getClockTime(); }
/* Helper to get the device latency from the backend, including any fixed
* latency from post-processing.