diff options
author | Chris Robinson <[email protected]> | 2021-04-24 09:03:14 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-04-24 09:03:14 -0700 |
commit | 581174ef98e92de89244412ddc94ae93d172e69c (patch) | |
tree | 4c818d345ed460a2656bff8ce9355e36c6e3ba26 /alc/backends/base.h | |
parent | b54bb388a3dbd92518beef4bda03df5854aad1a9 (diff) |
Use the DeviceBase for the backend
Diffstat (limited to 'alc/backends/base.h')
-rw-r--r-- | alc/backends/base.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alc/backends/base.h b/alc/backends/base.h index 07a91e25..853df893 100644 --- a/alc/backends/base.h +++ b/alc/backends/base.h @@ -30,9 +30,9 @@ struct BackendBase { virtual ClockLatency getClockLatency(); - ALCdevice *const mDevice; + DeviceBase *const mDevice; - BackendBase(ALCdevice *device) noexcept : mDevice{device} { } + BackendBase(DeviceBase *device) noexcept : mDevice{device} { } virtual ~BackendBase() = default; protected: @@ -57,7 +57,7 @@ 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(ALCdevice *device) +inline std::chrono::nanoseconds GetDeviceClockTime(DeviceBase *device) { using std::chrono::seconds; using std::chrono::nanoseconds; @@ -69,7 +69,7 @@ inline std::chrono::nanoseconds GetDeviceClockTime(ALCdevice *device) /* Helper to get the device latency from the backend, including any fixed * latency from post-processing. */ -inline ClockLatency GetClockLatency(ALCdevice *device) +inline ClockLatency GetClockLatency(DeviceBase *device) { BackendBase *backend{device->Backend.get()}; ClockLatency ret{backend->getClockLatency()}; @@ -85,7 +85,7 @@ struct BackendFactory { virtual std::string probe(BackendType type) = 0; - virtual BackendPtr createBackend(ALCdevice *device, BackendType type) = 0; + virtual BackendPtr createBackend(DeviceBase *device, BackendType type) = 0; protected: virtual ~BackendFactory() = default; |