diff options
author | Chris Robinson <[email protected]> | 2014-03-22 00:28:55 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-03-22 00:28:55 -0700 |
commit | d8bfd12d313372830f0e0b34fafcaa244395cf3c (patch) | |
tree | 14f4a3fe6e30380d5aded77969c59bf74fc8ca94 /Alc/backends/loopback.c | |
parent | 0a030c2bd91a0f7c94ce310ea4b03c6a923463b9 (diff) |
Use a void* for the backend Delete method param
Diffstat (limited to 'Alc/backends/loopback.c')
-rw-r--r-- | Alc/backends/loopback.c | 11 |
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); |