aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-28 22:03:54 -0700
committerChris Robinson <[email protected]>2013-10-28 22:03:54 -0700
commit3c65c946d4781cd6773c748b1e13f4c61db535e6 (patch)
tree7ed7bcf7ff780efac337eeba7fad8cab47f1e7d6 /Alc/ALc.c
parent16d5d5760c09018a600394d3eeccfb9f3a880b9b (diff)
Fix capture with the new backend interface
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c10
1 files changed, 8 insertions, 2 deletions
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);