aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/null.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-28 12:05:33 -0700
committerChris Robinson <[email protected]>2013-10-28 12:05:33 -0700
commitf24cb447818ea21ff5a5d80d6396abb4723fd2ed (patch)
tree3f10c96f9e11d1f0dd58501f166ba399ebdbeda8 /Alc/backends/null.c
parent2912d130c26056f21e938bbd776bbe8583c055cd (diff)
Move the device mutex to the backend
Diffstat (limited to 'Alc/backends/null.c')
-rw-r--r--Alc/backends/null.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Alc/backends/null.c b/Alc/backends/null.c
index d21ebf0c..af68c585 100644
--- a/Alc/backends/null.c
+++ b/Alc/backends/null.c
@@ -28,6 +28,7 @@
#include "alMain.h"
#include "alu.h"
#include "threads.h"
+#include "compat.h"
#include "backends/base.h"
@@ -85,8 +86,14 @@ static ALuint ALCnullBackend_mixerProc(ALvoid *ptr)
}
-static void ALCnullBackend_Destruct(ALCnullBackend* UNUSED(self))
+static void ALCnullBackend_Construct(ALCnullBackend *self, ALCdevice *device)
{
+ ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device);
+}
+
+static void ALCnullBackend_Destruct(ALCnullBackend *self)
+{
+ ALCbackend_Destruct(STATIC_CAST(ALCbackend, self));
}
static ALCenum ALCnullBackend_open(ALCnullBackend *self, const ALCchar *name)
@@ -197,7 +204,7 @@ ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory* UNUSED(se
if(!backend) return NULL;
SET_VTABLE2(ALCnullBackend, ALCbackend, backend);
- STATIC_CAST(ALCbackend, backend)->mDevice = device;
+ ALCnullBackend_Construct(backend, device);
return STATIC_CAST(ALCbackend, backend);
}