diff options
author | Chris Robinson <[email protected]> | 2013-10-28 22:03:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-10-28 22:03:54 -0700 |
commit | 3c65c946d4781cd6773c748b1e13f4c61db535e6 (patch) | |
tree | 7ed7bcf7ff780efac337eeba7fad8cab47f1e7d6 /Alc/ALc.c | |
parent | 16d5d5760c09018a600394d3eeccfb9f3a880b9b (diff) |
Fix capture with the new backend interface
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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); |