aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2015-10-28 18:10:12 -0700
committerChris Robinson <[email protected]>2015-10-28 18:10:12 -0700
commitbd73cdab0df049ece41f20ff6a83465b0bfb4e0a (patch)
tree4687c681e1a5273700c5f6f50704aec7871c4877 /Alc
parent59c6fc966dbcb70ebb99a5d25b7db41085b34e72 (diff)
Pass the appropriate BackendInfo explicitly to ProbeDevices
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 32fe4c5d..20aa4be0 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1223,39 +1223,27 @@ static void alc_deinit(void)
/************************************************
* Device enumeration
************************************************/
-static void ProbeDevices(al_string *list, enum DevProbe type)
+static void ProbeDevices(al_string *list, struct BackendInfo *backendinfo, enum DevProbe type)
{
DO_INITCONFIG();
LockLists();
al_string_clear(list);
- if(type == ALL_DEVICE_PROBE && (PlaybackBackend.Probe || PlaybackBackend.getFactory))
- {
- if(!PlaybackBackend.getFactory)
- PlaybackBackend.Probe(type);
- else
- {
- ALCbackendFactory *factory = PlaybackBackend.getFactory();
- V(factory,probe)(type);
- }
- }
- else if(type == CAPTURE_DEVICE_PROBE && (CaptureBackend.Probe || CaptureBackend.getFactory))
+ if(!backendinfo->getFactory)
+ backendinfo->Probe(type);
+ else
{
- if(!CaptureBackend.getFactory)
- CaptureBackend.Probe(type);
- else
- {
- ALCbackendFactory *factory = CaptureBackend.getFactory();
- V(factory,probe)(type);
- }
+ ALCbackendFactory *factory = backendinfo->getFactory();
+ V(factory,probe)(type);
}
+
UnlockLists();
}
static void ProbeAllDevicesList(void)
-{ ProbeDevices(&alcAllDevicesList, ALL_DEVICE_PROBE); }
+{ ProbeDevices(&alcAllDevicesList, &PlaybackBackend, ALL_DEVICE_PROBE); }
static void ProbeCaptureDeviceList(void)
-{ ProbeDevices(&alcCaptureDeviceList, CAPTURE_DEVICE_PROBE); }
+{ ProbeDevices(&alcCaptureDeviceList, &CaptureBackend, CAPTURE_DEVICE_PROBE); }
static void AppendDevice(const ALCchar *name, al_string *devnames)
{