Hi, jules
How are you?
I found in juce_win32_ASIO.cpp, there are some new stuff(compared with juce1.46), and could you explain the following new code to me?
in class ASIOAudioIODevice, it has new datamember: optionalDllForDirectLoading (optionalDllForDirectLoading_),
in loadDriver() function
…
if (optionalDllForDirectLoading.isNotEmpty())
{
HMODULE h = LoadLibrary (optionalDllForDirectLoading);
if (h != 0)
{
typedef HRESULT (CALLBACK* DllGetClassObjectFunc) (REFCLSID clsid, REFIID iid, LPVOID* ppv);
DllGetClassObjectFunc dllGetClassObject = (DllGetClassObjectFunc) GetProcAddress (h, "DllGetClassObject");
if (dllGetClassObject != 0)
{
IClassFactory* classFactory = 0;
HRESULT hr = dllGetClassObject (classId, IID_IClassFactory, (void**) &classFactory);
if (classFactory != 0)
{
hr = classFactory->CreateInstance (0, classId, (void**) &asioObject);
classFactory->Release();
}
return asioObject != 0;
}
}
}
Issue found in the following code, when I try to set one asio deivce. "asio digidesign driver"
And in loadDriver()
bool loadDriver()
{
removeCurrentDriver();
JUCE_TRY
{
//try {
if (CoCreateInstance (classId, 0, CLSCTX_INPROC_SERVER,
classId, (void**) &asioObject) == S_OK)
{
return true;
}
}
when I try to set a device in plugin, CoCreateInstance () call never get returned.so plugin crashed.
What does this call mean?
you added another function :
AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& deviceName,
void* guid,
const String& optionalDllForDirectLoading)
what does guid mean?
Thanks!
Leon