AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hello, doing an integration with TDR audio Nova.General flow is AEffect gets loaded via DLL VstPluginMain function.
Then, it does calls like this:
Code: Select all (#)
effect->dispatcher(effect, effGetEffectName, 0, 0, effectName, 0);
effect->dispatcher(effect, effGetVendorString, 0, 0, vendorString, 0);
effect->dispatcher(effect, effOpen, 0, 0, nullptr, 0.0f);
size_t sampleRate = audio_output_get_sample_rate(obs_get_audio());
effect->dispatcher(effect, effSetSampleRate, 0, 0, nullptr, sampleRate);
int blocksize = BLOCK_SIZE;
effect->dispatcher(effect, effSetBlockSize, 0, blocksize, nullptr, 0.0f);
effect->dispatcher(effect, effMainsChanged, 0, 1, nullptr, 0);
Code: Select all (#)
windowWorker = std::thread(std::bind(&EditorWidget::buildEffectContainer_worker, this));
Code: Select all (#)
buildEffectContainer_worker
Code: Select all (#)
effEditOpen
Other VST plugins load and work ok.
Code in buildEffectContainer_worker function which creates a window and calls effEditOpen:
Code: Select all (#)
wcex.lpfnWndProc = DefWindowProc;
wcex.hInstance = GetModuleHandleW(nullptr);
wcex.lpszClassName = L"Minimal VST host - Guest VST Window Frame";
RegisterClassExW(&wcex);
LONG style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_DLGFRAME | WS_POPUP | WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX;
LONG exStyle = WS_EX_DLGMODALFRAME;
m_hwnd = CreateWindowEx(exStyle,
wcex.lpszClassName,
TEXT(""),
style, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
m_effect->dispatcher(m_effect, effEditOpen, 0, 0, m_hwnd, 0); //-> hangs here, no UI is displayed.