Use the macros to allocate the wrapper backends

This commit is contained in:
Chris Robinson
2015-09-24 15:54:32 -07:00
parent 17e2b4b3a5
commit 30d88cf547
+2 -6
View File
@@ -195,11 +195,9 @@ ALCbackend *create_backend_wrapper(ALCdevice *device, const BackendFuncs *funcs,
{
PlaybackWrapper *backend;
backend = PlaybackWrapper_New(sizeof(*backend));
NEW_OBJ(backend, PlaybackWrapper)(device, funcs);
if(!backend) return NULL;
PlaybackWrapper_Construct(backend, device, funcs);
return STATIC_CAST(ALCbackend, backend);
}
@@ -207,11 +205,9 @@ ALCbackend *create_backend_wrapper(ALCdevice *device, const BackendFuncs *funcs,
{
CaptureWrapper *backend;
backend = CaptureWrapper_New(sizeof(*backend));
NEW_OBJ(backend, CaptureWrapper)(device, funcs);
if(!backend) return NULL;
CaptureWrapper_Construct(backend, device, funcs);
return STATIC_CAST(ALCbackend, backend);
}