mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Connect to the unix socket from the Wine VST host
This commit is contained in:
@@ -55,6 +55,7 @@ bp::environment set_wineprefix();
|
||||
Bridge::Bridge()
|
||||
: io_context(),
|
||||
socket_endpoint(generate_endpoint_name().string()),
|
||||
socket_acceptor(io_context, socket_endpoint),
|
||||
host_vst_dispatch(io_context),
|
||||
vst_stdin(),
|
||||
vst_stdout(),
|
||||
@@ -66,12 +67,9 @@ Bridge::Bridge()
|
||||
bp::std_in = vst_stdin,
|
||||
bp::std_out = vst_stdout,
|
||||
bp::env = set_wineprefix()) {
|
||||
boost::asio::local::stream_protocol::acceptor acceptor(io_context,
|
||||
socket_endpoint);
|
||||
|
||||
// It's very important that these sockets are connected to in the same order
|
||||
// in the Wine VST host
|
||||
acceptor.accept(host_vst_dispatch);
|
||||
socket_acceptor.accept(host_vst_dispatch);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,7 +185,8 @@ fs::path find_vst_plugin() {
|
||||
"VST plugin .dll file.");
|
||||
}
|
||||
|
||||
return plugin_path;
|
||||
// Also resolve symlinks here, mostly for development purposes
|
||||
return fs::canonical(plugin_path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,6 +64,7 @@ class Bridge {
|
||||
private:
|
||||
boost::asio::io_context io_context;
|
||||
boost::asio::local::stream_protocol::endpoint socket_endpoint;
|
||||
boost::asio::local::stream_protocol::acceptor socket_acceptor;
|
||||
|
||||
// The naming convention for these sockets is `<from>_<to>_<event>`. For
|
||||
// instance the socket named `host_vst_dispatch` forwards
|
||||
|
||||
Reference in New Issue
Block a user