aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/null.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-22 00:28:55 -0700
committerChris Robinson <[email protected]>2014-03-22 00:28:55 -0700
commitd8bfd12d313372830f0e0b34fafcaa244395cf3c (patch)
tree14f4a3fe6e30380d5aded77969c59bf74fc8ca94 /Alc/backends/null.c
parent0a030c2bd91a0f7c94ce310ea4b03c6a923463b9 (diff)
Use a void* for the backend Delete method param
Diffstat (limited to 'Alc/backends/null.c')
-rw-r--r--Alc/backends/null.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Alc/backends/null.c b/Alc/backends/null.c
index a7056369..59299dff 100644
--- a/Alc/backends/null.c
+++ b/Alc/backends/null.c
@@ -55,6 +55,8 @@ static DECLARE_FORWARD(ALCnullBackend, ALCbackend, ALCuint, availableSamples)
static DECLARE_FORWARD(ALCnullBackend, ALCbackend, ALint64, getLatency)
static DECLARE_FORWARD(ALCnullBackend, ALCbackend, void, lock)
static DECLARE_FORWARD(ALCnullBackend, ALCbackend, void, unlock)
+DECLARE_DEFAULT_ALLOCATORS(ALCnullBackend)
+
static const ALCchar nullDevice[] = "No Output";
@@ -152,12 +154,6 @@ static void ALCnullBackend_stop(ALCnullBackend *self)
self->killNow = 0;
}
-
-static void ALCnullBackend_Delete(ALCnullBackend *self)
-{
- free(self);
-}
-
DEFINE_ALCBACKEND_VTABLE(ALCnullBackend);
@@ -213,8 +209,9 @@ static ALCbackend* ALCnullBackendFactory_createBackend(ALCnullBackendFactory* UN
assert(type == ALCbackend_Playback);
- backend = calloc(1, sizeof(*backend));
+ backend = ALCnullBackend_New(sizeof(*backend));
if(!backend) return NULL;
+ memset(backend, 0, sizeof(*backend));
ALCnullBackend_Construct(backend, device);