summaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-29 10:38:55 -0700
committerChris Robinson <[email protected]>2013-10-29 10:38:55 -0700
commitd2b36159431789d6934f5569e54982d7c54c4e84 (patch)
tree4b29971d48fc06a49c4003d959ca3c33375cc976 /Alc/ALc.c
parent3437769ba0e00fcc6f831f62e096b0be5fe565ab (diff)
Convert the loopback backend to the new interface
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index efbc4be5..266134c9 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -99,9 +99,6 @@ static struct BackendInfo BackendList[] = {
{ NULL, NULL, NULL, NULL, NULL, EmptyFuncs }
};
-static struct BackendInfo BackendLoopback = {
- "loopback", NULL, alc_loopback_init, alc_loopback_deinit, alc_loopback_probe, EmptyFuncs
-};
#undef EmptyFuncs
static struct BackendInfo PlaybackBackend;
@@ -1063,7 +1060,10 @@ static void alc_initconfig(void)
TRACE("Added \"%s\" for capture\n", CaptureBackend.name);
}
}
- BackendLoopback.Init(&BackendLoopback.Funcs);
+ {
+ ALCbackendFactory *factory = ALCloopbackFactory_getFactory();
+ VCALL0(factory,init)();
+ }
if(ConfigValueStr(NULL, "excludefx", &str))
{
@@ -1161,7 +1161,10 @@ static void alc_deinit(void)
VCALL0(factory,deinit)();
}
}
- BackendLoopback.Deinit();
+ {
+ ALCbackendFactory *factory = ALCloopbackFactory_getFactory();
+ VCALL0(factory,deinit)();
+ }
alc_deinit_safe();
}
@@ -3284,6 +3287,7 @@ ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer,
*/
ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName)
{
+ ALCbackendFactory *factory;
ALCdevice *device;
DO_INITCONFIG();
@@ -3303,7 +3307,6 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
}
//Validate device
- device->Funcs = &BackendLoopback.Funcs;
device->ref = 1;
device->Connected = ALC_TRUE;
device->Type = Loopback;
@@ -3324,7 +3327,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
InitUIntMap(&device->EffectMap, ~0);
InitUIntMap(&device->FilterMap, ~0);
- device->Backend = create_backend_wrapper(device, ALCbackend_Playback);
+ factory = ALCloopbackFactory_getFactory();
+ device->Backend = VCALL(factory,createBackend)(device, ALCbackend_Playback);
if(!device->Backend)
{
al_free(device);