Move the MainContext to HostBridge

We'll use this to create a watchdog timer that shuts down the sockets
when the native host gets terminated.
This commit is contained in:
Robbert van der Helm
2021-05-01 15:06:13 +02:00
parent 564e047b4b
commit b22f207aee
6 changed files with 16 additions and 22 deletions
+1 -2
View File
@@ -69,9 +69,8 @@ Vst2Bridge& get_bridge_instance(const AEffect* plugin) {
Vst2Bridge::Vst2Bridge(MainContext& main_context,
std::string plugin_dll_path,
std::string endpoint_base_dir)
: HostBridge(plugin_dll_path),
: HostBridge(main_context, plugin_dll_path),
logger(generic_logger),
main_context(main_context),
plugin_handle(LoadLibrary(plugin_dll_path.c_str()), FreeLibrary),
sockets(main_context.context, endpoint_base_dir, false) {
// HACK: If the plugin library was unable to load, then there's a tiny