aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/loopback.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/loopback.c')
-rw-r--r--Alc/backends/loopback.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Alc/backends/loopback.c b/Alc/backends/loopback.c
index cd5b1a1e..053cfce4 100644
--- a/Alc/backends/loopback.c
+++ b/Alc/backends/loopback.c
@@ -44,7 +44,7 @@ static DECLARE_FORWARD(ALCloopback, ALCbackend, ALCuint, availableSamples)
static DECLARE_FORWARD(ALCloopback, ALCbackend, ALint64, getLatency)
static DECLARE_FORWARD(ALCloopback, ALCbackend, void, lock)
static DECLARE_FORWARD(ALCloopback, ALCbackend, void, unlock)
-static void ALCloopback_Delete(ALCloopback *self);
+DECLARE_DEFAULT_ALLOCATORS(ALCloopback)
DEFINE_ALCBACKEND_VTABLE(ALCloopback);
@@ -83,12 +83,6 @@ static void ALCloopback_stop(ALCloopback* UNUSED(self))
}
-static void ALCloopback_Delete(ALCloopback *self)
-{
- free(self);
-}
-
-
typedef struct ALCloopbackFactory {
DERIVE_FROM_TYPE(ALCbackendFactory);
} ALCloopbackFactory;
@@ -131,8 +125,9 @@ static ALCbackend* ALCloopbackFactory_createBackend(ALCloopbackFactory* UNUSED(s
assert(type == ALCbackend_Loopback);
- backend = calloc(1, sizeof(*backend));
+ backend = ALCloopback_New(sizeof(*backend));
if(!backend) return NULL;
+ memset(backend, 0, sizeof(*backend));
ALCloopback_Construct(backend, device);