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/dsound.cpp | |
parent | 0dfb805fa2f85bed47612a75628d7d9742877b26 (diff) |
Avoid calling through the vtable in the backends
Diffstat (limited to 'Alc/backends/dsound.cpp')
-rw-r--r-- | Alc/backends/dsound.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp index e760e9f5..10650175 100644 --- a/Alc/backends/dsound.cpp +++ b/Alc/backends/dsound.cpp @@ -257,9 +257,9 @@ FORCE_ALIGN static int ALCdsoundPlayback_mixerProc(ALCdsoundPlayback *self) if(FAILED(err)) { ERR("Failed to get buffer caps: 0x%lx\n", err); - ALCdevice_Lock(device); + ALCdsoundPlayback_lock(self); aluHandleDisconnect(device, "Failure retrieving playback buffer info: 0x%lx", err); - ALCdevice_Unlock(device); + ALCdsoundPlayback_unlock(self); return 1; } @@ -285,9 +285,9 @@ FORCE_ALIGN static int ALCdsoundPlayback_mixerProc(ALCdsoundPlayback *self) if(FAILED(err)) { ERR("Failed to play buffer: 0x%lx\n", err); - ALCdevice_Lock(device); + ALCdsoundPlayback_lock(self); aluHandleDisconnect(device, "Failure starting playback: 0x%lx", err); - ALCdevice_Unlock(device); + ALCdsoundPlayback_unlock(self); return 1; } Playing = true; @@ -323,10 +323,10 @@ FORCE_ALIGN static int ALCdsoundPlayback_mixerProc(ALCdsoundPlayback *self) if(SUCCEEDED(err)) { // If we have an active context, mix data directly into output buffer otherwise fill with silence - ALCdevice_Lock(device); + ALCdsoundPlayback_lock(self); aluMixData(device, WritePtr1, WriteCnt1/FrameSize); aluMixData(device, WritePtr2, WriteCnt2/FrameSize); - ALCdevice_Unlock(device); + ALCdsoundPlayback_unlock(self); // Unlock output buffer only when successfully locked Buffer->Unlock(WritePtr1, WriteCnt1, WritePtr2, WriteCnt2); @@ -334,9 +334,9 @@ FORCE_ALIGN static int ALCdsoundPlayback_mixerProc(ALCdsoundPlayback *self) else { ERR("Buffer lock error: %#lx\n", err); - ALCdevice_Lock(device); + ALCdsoundPlayback_lock(self); aluHandleDisconnect(device, "Failed to lock output buffer: 0x%lx", err); - ALCdevice_Unlock(device); + ALCdsoundPlayback_unlock(self); return 1; } |