aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-27 15:27:43 -0800
committerChris Robinson <[email protected]>2014-11-27 15:27:43 -0800
commit8d6d2e9a2b0084e9c8137354836bf747107b567e (patch)
tree4996f272ef720b6a1dce3dd7b7745852c3d577f7 /Alc/backends
parent82780a703b46849f6e786c1b28edbfcd21333a3b (diff)
Avoid unnecessary uses of ALCdevice_Lock and ALCdevice_Unlock
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/mmdevapi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index 95a0948c..89022b6d 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -500,9 +500,9 @@ FORCE_ALIGN static int ALCmmdevPlayback_mixerProc(void *arg)
if(FAILED(hr))
{
ERR("CoInitialize(NULL) failed: 0x%08lx\n", hr);
- ALCdevice_Lock(device);
+ V0(device->Backend,lock)();
aluHandleDisconnect(device);
- ALCdevice_Unlock(device);
+ V0(device->Backend,unlock)();
return 1;
}
@@ -517,9 +517,9 @@ FORCE_ALIGN static int ALCmmdevPlayback_mixerProc(void *arg)
if(FAILED(hr))
{
ERR("Failed to get padding: 0x%08lx\n", hr);
- ALCdevice_Lock(device);
+ V0(device->Backend,lock)();
aluHandleDisconnect(device);
- ALCdevice_Unlock(device);
+ V0(device->Backend,unlock)();
break;
}
self->Padding = written;
@@ -538,18 +538,18 @@ FORCE_ALIGN static int ALCmmdevPlayback_mixerProc(void *arg)
hr = IAudioRenderClient_GetBuffer(self->render, len, &buffer);
if(SUCCEEDED(hr))
{
- ALCdevice_Lock(device);
+ V0(device->Backend,lock)();
aluMixData(device, buffer, len);
self->Padding = written + len;
- ALCdevice_Unlock(device);
+ V0(device->Backend,unlock)();
hr = IAudioRenderClient_ReleaseBuffer(self->render, len, 0);
}
if(FAILED(hr))
{
ERR("Failed to buffer data: 0x%08lx\n", hr);
- ALCdevice_Lock(device);
+ V0(device->Backend,lock)();
aluHandleDisconnect(device);
- ALCdevice_Unlock(device);
+ V0(device->Backend,unlock)();
break;
}
}