Improved: Configurator.exe now has experimental support for installing the APO even if the sound device previously did not use any APOs. (shown as "APO can be installed (experimental)")
This commit is contained in:
1 parent
ef61580c19
commit
3f07980abc
11 files changed
+284
-52
No files matched your search
+42
-38
@@ -130,47 +130,51 @@ HRESULT EqualizerAPO::Initialize(UINT32 cbDataSize, BYTE* pbyData)
|
||||
|
||||
TraceF(L"Child APO GUID: %s", apoGuid.c_str());
|
||||
|
||||
GUID childGuid;
|
||||
hr = CLSIDFromString(apoGuid.c_str(), &childGuid);
|
||||
if(FAILED(hr))
|
||||
if(apoGuid != APOGUID_NOKEY)
|
||||
{
|
||||
LogF(L"Can't convert guid string to guid");
|
||||
return hr;
|
||||
GUID childGuid;
|
||||
hr = CLSIDFromString(apoGuid.c_str(), &childGuid);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Can't convert guid string to guid");
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = CoCreateInstance(childGuid, NULL, CLSCTX_INPROC_SERVER, __uuidof(IAudioProcessingObject), (void**)&childAPO);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in CoCreateInstance for child apo");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = childAPO->QueryInterface(__uuidof(IAudioProcessingObjectRT), (void**)&childRT);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in QueryInterface for child apo RT");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = childAPO->QueryInterface(__uuidof(IAudioProcessingObjectConfiguration), (void**)&childCfg);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in QueryInterface for child apo configuration");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = childAPO->Initialize(cbDataSize, pbyData);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in Initialize of child apo");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
TraceF(L"Successfully created and initialized child APO");
|
||||
}
|
||||
|
||||
hr = CoCreateInstance(childGuid, NULL, CLSCTX_INPROC_SERVER, __uuidof(IAudioProcessingObject), (void**)&childAPO);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in CoCreateInstance for child apo");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = childAPO->QueryInterface(__uuidof(IAudioProcessingObjectRT), (void**)&childRT);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in QueryInterface for child apo RT");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = childAPO->QueryInterface(__uuidof(IAudioProcessingObjectConfiguration), (void**)&childCfg);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in QueryInterface for child apo configuration");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = childAPO->Initialize(cbDataSize, pbyData);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LogF(L"Error in Initialize of child apo");
|
||||
resetChild();
|
||||
return hr;
|
||||
}
|
||||
|
||||
TraceF(L"Successfully created and initialized child APO");
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user