diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 3a083048..60c7e790 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -1176,21 +1176,24 @@ static void alc_initconfig(void) /************************************************ * Device enumeration ************************************************/ -static void ProbeDevices(std::string *list, DevProbe type) +static void ProbeAllDevicesList() { DO_INITCONFIG(); std::lock_guard _{ListLock}; - list->clear(); - if(type == DevProbe::Playback && PlaybackFactory) - PlaybackFactory->probe(type, list); - else if(type == DevProbe::Capture && CaptureFactory) - CaptureFactory->probe(type, list); + alcAllDevicesList.clear(); + if(PlaybackFactory) + PlaybackFactory->probe(DevProbe::Playback, &alcAllDevicesList); +} +static void ProbeCaptureDeviceList() +{ + DO_INITCONFIG(); + + std::lock_guard _{ListLock}; + alcCaptureDeviceList.clear(); + if(CaptureFactory) + CaptureFactory->probe(DevProbe::Capture, &alcCaptureDeviceList); } -static void ProbeAllDevicesList(void) -{ ProbeDevices(&alcAllDevicesList, DevProbe::Playback); } -static void ProbeCaptureDeviceList(void) -{ ProbeDevices(&alcCaptureDeviceList, DevProbe::Capture); } /************************************************