diff options
author | Chris Robinson <[email protected]> | 2018-11-13 18:05:10 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-13 18:41:24 -0800 |
commit | 7088f4e34a8557f2c73ee6635b3c7bf4ec958c63 (patch) | |
tree | 48fcff3de36d357a0cdbd97840a93e9bdd3be30e /Alc/backends/wasapi.cpp | |
parent | 0dfb805fa2f85bed47612a75628d7d9742877b26 (diff) |
Avoid calling through the vtable in the backends
Diffstat (limited to 'Alc/backends/wasapi.cpp')
-rw-r--r-- | Alc/backends/wasapi.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp index 50c0baa8..22edc09f 100644 --- a/Alc/backends/wasapi.cpp +++ b/Alc/backends/wasapi.cpp @@ -576,9 +576,9 @@ FORCE_ALIGN static int ALCwasapiPlayback_mixerProc(ALCwasapiPlayback *self) if(FAILED(hr)) { ERR("CoInitializeEx(nullptr, COINIT_MULTITHREADED) failed: 0x%08lx\n", hr); - V0(device->Backend,lock)(); + ALCwasapiPlayback_lock(self); aluHandleDisconnect(device, "COM init failed: 0x%08lx", hr); - V0(device->Backend,unlock)(); + ALCwasapiPlayback_unlock(self); return 1; } @@ -594,9 +594,9 @@ FORCE_ALIGN static int ALCwasapiPlayback_mixerProc(ALCwasapiPlayback *self) if(FAILED(hr)) { ERR("Failed to get padding: 0x%08lx\n", hr); - V0(device->Backend,lock)(); + ALCwasapiPlayback_lock(self); aluHandleDisconnect(device, "Failed to retrieve buffer padding: 0x%08lx", hr); - V0(device->Backend,unlock)(); + ALCwasapiPlayback_unlock(self); break; } self->mPadding.store(written, std::memory_order_relaxed); @@ -625,9 +625,9 @@ FORCE_ALIGN static int ALCwasapiPlayback_mixerProc(ALCwasapiPlayback *self) if(FAILED(hr)) { ERR("Failed to buffer data: 0x%08lx\n", hr); - V0(device->Backend,lock)(); + ALCwasapiPlayback_lock(self); aluHandleDisconnect(device, "Failed to send playback samples: 0x%08lx", hr); - V0(device->Backend,unlock)(); + ALCwasapiPlayback_unlock(self); break; } } @@ -1247,9 +1247,9 @@ FORCE_ALIGN int ALCwasapiCapture_recordProc(ALCwasapiCapture *self) if(FAILED(hr)) { ERR("CoInitializeEx(nullptr, COINIT_MULTITHREADED) failed: 0x%08lx\n", hr); - V0(device->Backend,lock)(); + ALCwasapiCapture_lock(self); aluHandleDisconnect(device, "COM init failed: 0x%08lx", hr); - V0(device->Backend,unlock)(); + ALCwasapiCapture_unlock(self); return 1; } @@ -1327,9 +1327,9 @@ FORCE_ALIGN int ALCwasapiCapture_recordProc(ALCwasapiCapture *self) if(FAILED(hr)) { - V0(device->Backend,lock)(); + ALCwasapiCapture_lock(self); aluHandleDisconnect(device, "Failed to capture samples: 0x%08lx", hr); - V0(device->Backend,unlock)(); + ALCwasapiCapture_unlock(self); break; } |