Move process launching to a function

Starting and connecting to plugin group host processes is not going to
work in the intializer list.
This commit is contained in:
Robbert van der Helm
2020-05-21 18:09:32 +02:00
parent 91b0ebf38b
commit fea256655d
2 changed files with 63 additions and 34 deletions
+15
View File
@@ -109,6 +109,19 @@ class PluginBridge {
boost::asio::streambuf& buffer,
std::string prefix = "");
/**
* Launch the Wine VST host to host the plugin. When using plugin groups,
* this will first try to connect to the plugin group's socket (determined
* based on group name, Wine prefix and architecture). If that fails, it
* will launch a new, detached group host process. This will likely outlive
* this plugin instance if multiple instances of yabridge using the same
* plugin group are in use. In the event that two yabridge instances are
* initialized at the same time and both instances spawn their own group
* host process, then the later one will simply terminate gracefully after
* it fails to listen on the socket.
*/
void launch_vst_host();
/**
* Format and log all relevant debug information during initialization.
*/
@@ -217,6 +230,8 @@ class PluginBridge {
/**
* The Wine process hosting the Windows VST plugin.
*
* @see launch_vst_host
*/
boost::process::child vst_host;