Inbound FAudio fixes

This commit is contained in:
ZachBacon 2018-12-25 15:29:11 -05:00
parent ba563c71b3
commit af98f532b1
1 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
#include "../common/ConfigManager.h" #include "../common/ConfigManager.h"
#include "../common/SoundDriver.h" #include "../common/SoundDriver.h"
// Faudio // FAudio
#include <faudio.h> #include <faudio.h>
// MMDevice API // MMDevice API
@ -25,23 +25,23 @@ int GetFADevices(FAudio* fa, wxArrayString* names, wxArrayString* ids,
{ {
HRESULT hr; HRESULT hr;
UINT32 dev_count = 0; UINT32 dev_count = 0;
hr = fa->FAudio_GetDeviceCount(&dev_count); hr = FAudio_GetDeviceCount(fa, &dev_count);
if (hr != S_OK) { if (hr != S_OK) {
wxLogError(_("FAudio: Enumerating devices failed!")); wxLogError(_("FAudio: Enumerating devices failed!"));
return true; return true;
} else { } else {
FaudioDeviceDetails dd; FAudioDeviceDetails dd;
for (UINT32 i = 0; i < dev_count; i++) { for (UINT32 i = 0; i < dev_count; i++) {
hr = fa->GetDeviceDetails(i, &dd); hr = FAudio_GetDeviceDetails(fa, i, &dd);
if (hr != S_OK) { if (hr != S_OK) {
continue; continue;
} else { } else {
if (ids) { if (ids) {
ids->push_back(dd.DeviceID); ids->push_back((wchar_t*) dd.DeviceID);
names->push_back(dd.DisplayName); names->push_back((wchar_t*) dd.DisplayName);
} else if (*match == dd.DeviceID) } else if (*match == dd.DeviceID)
return i; return i;
} }