From 3c65c946d4781cd6773c748b1e13f4c61db535e6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 28 Oct 2013 22:03:54 -0700 Subject: Fix capture with the new backend interface --- Alc/ALc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index 4aaf765a..efbc4be5 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -2890,7 +2890,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) else { ALCbackendFactory *factory = PlaybackBackend.getFactory(); - device->Backend = VCALL(factory,createBackend)(device); + device->Backend = VCALL(factory,createBackend)(device, ALCbackend_Playback); } if(!device->Backend) { @@ -3152,7 +3152,13 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, device->DeviceName = NULL; - device->Backend = create_backend_wrapper(device, ALCbackend_Capture); + if(!CaptureBackend.getFactory) + device->Backend = create_backend_wrapper(device, ALCbackend_Capture); + else + { + ALCbackendFactory *factory = CaptureBackend.getFactory(); + device->Backend = VCALL(factory,createBackend)(device, ALCbackend_Capture); + } if(!device->Backend) { al_free(device); -- cgit v1.2.3