Fixed a few things, still have lots to fix though before it's a usable state.
This commit is contained in:
parent
99795b270d
commit
4361c45b16
|
@ -20,7 +20,7 @@
|
||||||
#include "../System.h" // for systemMessage()
|
#include "../System.h" // for systemMessage()
|
||||||
#include "../gba/Globals.h"
|
#include "../gba/Globals.h"
|
||||||
|
|
||||||
int GetFA2Devices(Faudio* fa, wxArrayString* names, wxArrayString* ids,
|
int GetFADevices(FAudio* fa, wxArrayString* names, wxArrayString* ids,
|
||||||
const wxString* match)
|
const wxString* match)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -51,7 +51,7 @@ int GetFA2Devices(Faudio* fa, wxArrayString* names, wxArrayString* ids,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetFA2Devices(wxArrayString& names, wxArrayString& ids)
|
bool GetFADevices(wxArrayString& names, wxArrayString& ids)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
FAudio* fa = NULL;
|
FAudio* fa = NULL;
|
||||||
|
@ -59,24 +59,24 @@ bool GetFA2Devices(wxArrayString& names, wxArrayString& ids)
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
flags = FAUDIO_DEBUG_ENGINE;
|
flags = FAUDIO_DEBUG_ENGINE;
|
||||||
#endif
|
#endif
|
||||||
hr = FAudioreate(&fa, flags);
|
hr = FAudioCreate(&fa, flags);
|
||||||
|
|
||||||
if (hr != S_OK) {
|
if (hr != S_OK) {
|
||||||
wxLogError(_("The FAudio interface failed to initialize!"));
|
wxLogError(_("The FAudio interface failed to initialize!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetFA2Devices(fa, &names, &ids, NULL);
|
GetFADevices(fa, &names, &ids, NULL);
|
||||||
fa->Release();
|
fa->Release();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int FAGetDev(Faudio* fa)
|
static int FAGetDev(FAudio* fa)
|
||||||
{
|
{
|
||||||
if (gopts.audio_dev.empty())
|
if (gopts.audio_dev.empty())
|
||||||
return 0;
|
return 0;
|
||||||
else {
|
else {
|
||||||
int ret = GetFA2Devices(fa, NULL, NULL, &gopts.audio_dev);
|
int ret = GetFADevices(fa, NULL, NULL, &gopts.audio_dev);
|
||||||
return ret < 0 ? 0 : ret;
|
return ret < 0 ? 0 : ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue