From 7088f4e34a8557f2c73ee6635b3c7bf4ec958c63 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 13 Nov 2018 18:05:10 -0800 Subject: Avoid calling through the vtable in the backends --- Alc/backends/wasapi.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Alc/backends/wasapi.cpp') 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; } -- cgit v1.2.3