aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
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);